DB
PostgreSQL https://hub.docker.com/r/library/postgres/start a postgres instance [root@docker01 ~]# docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres Unable to find image 'postgres:latest' locally…
以前にもインストールしましたが、 再びMySQLのインストールです。今回はこれだけ! # rpm -ivh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm # yum install mysql-community-serverこれで、 [root@localhost .ssh]# rpm -qa |grep mysq…
いろいろ書いてある Optimizing MySQL for Zabbix Optimizing MySQL for Zabbix
なんか、中途半端な状態で終了したのか、 MySQL Workbenchが起動しなくなった。起動した際に、エラーが出て何もできない状態・・・仕方がなく、再インストール。 ・・・ が、やはりエラー。 ・・・ 下のデータを消して再度インストール C:\Users\<ユーザ名>\…
データベースを作ったりする前に、my.cnfの文字コード設定を変えておいた方がよいので。UTF-8にします。 # service mysqld stop mysqld を停止中: [ OK ] # diff /etc/my.cnf.org /etc/my.cnf 22a23,25 > # character > character-set-server=utf8 > # servi…
外部から接続するためのデータベースを用意します。 mysql> create database sample; Query OK, 1 row affected (0.00 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | perfor…
インストールした後の続きです。MySQLを起動します。 # service mysqld start パスワードを変更するなど言われるので パスワードを変更います。 # /usr/bin/mysqladmin -u root password 'new-password'コマンドラインから変更したので Warning: Using a pas…
CentOS 6.5の環境で、MySQL 5.6をインストールしてみた。 以下より、「Red Hat Enterprise Linux / Oracle Linux」を選択し、 rpmファイルを取得。 MySQL :: Download MySQL Community Server取得したrpmファイルをインストール。 # rpm -ivh mysql-communit…
mysql の起動確認 # service mysqld status mysqld (pid 3112) is running... # mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 14 Server version: 5.6.16 MySQL Community Serv…
mysql_secure_installationの実行 # /usr/bin/mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, w…
サービスを起動 # service mysqld start Initializing MySQL database: 2014-dd-dd hh:MM:dd 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more …
インストール前のパッケージ # rpm -qa |grep mysql mysql-libs-5.1.71-1.el6.x86_64 mysql-community-release-el6-5.noarch インストール実行 # yum update mysql mysql-server (途中省略) Warning: RPMDB altered outside of yum. Installing : mysql-co…
インストールの下準備。 # rpm -ivh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm Retrieving http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm Preparing... ########################################### [100%] 1:my…
外部ホストから接続可能なように設定。 mysql> grant all privileges on test.* to <ユーザ名>@"%" identified by '<パスワード>' with grant option;追加されたことを確認する。 mysql> select host, user from mysql.user; +-----------------------+-…
パスワード変更 ALTER USER testuser with unencrypted password 'testuser'; データベース一覧 \l データベースを選択する。 \c データベース名 <参考>Javaの型と各DBの型のマッピング http://dounanda.s140.xrea.com/mapping.html
http://beck.boo.jp/pukiwiki/oracle/sql*plus/以下のコマンド覚えておくと便利、いつも忘れる。 -- 文字列 column <カラム名> format a15; -- 数値 column <カラム名> format 999,999,999; -- 一行の長さ set lines 100; -- 一度に表示するレコードの件数 s…
pgAdminを使ってテーブルの定義を設定したら SQLが勝手に作成される!次のようなコマンドができた! CREATE TABLE "SAMPLE_INFO" ( "CHECK_NUMBER" character varying(30) NOT NULL, "SEND_TIME" bigint DEFAULT 0, "RECV_TIME" bigint DEFAULT 0, "RESEND_T…
> mysql -u <ユーザ> -p uq < sqlファイル名これでsqlがかかれたファイルの実行。
MySQL WorkbenchでSQL Queryで日本語を入力しようとしたらエラーが返ってきた。 Error Code:1366 です。 文字コードが問題っぽいけど。。。 mysql> show variables like 'character%'; +--------------------------+---------------------------------------…
上記のようにOKだと思ったんだけど、 うーむなぜか、 use <DB名> として、利用するDBを指定すると mysql> show variables like "char%"; +--------------------------+---------------------------------------------------------+ | Variable_name …
ファイルからインポートしてみる。>mysqlimport -u <ユーザ名> -p --local --fields-terminated-by="," <DB名> users.csv Enter password: <パスワード> <DB名>.users: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0users.csvは エンコードコー…
問題なくインストールできたっぽい。インストール時のメモ■MySQL Serer Instance Configuration Wizard1.初めの画面、選択はないため、Nextを押す。2.Please select a configuration type ・Detailed Configuration ○ ・Standard Configuration3.Pleas…