2017年06月08日

CentOS6 MySQL5.1.73 (バンドル)

cat /etc/redhat-release
arch
mysql --version
00.png

サンプルを探す
find /* -name my*.cnf 
00.png
cat /etc/my.cnf
00.png
ls /usr/share/mysql/my*.cnf
00.png
/usr/share/mysql/my-huge.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-large.cnf

cp /usr/share/mysql/my-innodb-heavy-4G.cnf /etc/my.cnf

vi /etc/my.cnf
[client]
default-character-set = utf8
[mysqld]
character-set-server = utf8

service mysqld start
00.png


mysql_secure_installation
00.png
00.png

mysql -uroot -p
00.png

Create Database testdb;
grant all privileges on *.* to usr1 identified by 'Passwd6';
FLUSH PRIVILEGES;
show grants;
00.png

SHOW variables like 'character_set%';
00.png


vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
00.png
/etc/init.d/iptables restart
00.png












posted by a23 at 17:02| Comment(0) | MySQL

CentOS7 MariaDB 5.5.52 → 10.1.24 アップグレード (バンドル)

CentOS7 にバンドルのMariaDB 5.5.52 を 10.1.24 アップグレード 

参考 CentOS7のMariaDB5.5を10.1にアップグレードする
http://qiita.com/egnr-in-6matroom/items/6dbb684ff03a228947bd


公式yumリポジトリ追加

/etc/yum.repos.d/MariaDB.repo
-------------------------------------------------------------------------------------
# MariaDB 10.1 CentOS repository list

[mariadb]
name = MariaDB
gpgcheck=1
-------------------------------------------------------------------------------------
サーバ停止
sudo systemctl stop mariadb
アッフデート
sudo yum update mariadb-server -y
Screenshot from 2017-06-09 10-46-12.png
Screenshot from 2017-06-09 10-49-31.png





find /* -name my*.cnf 
ls /usr/share/mysql/my*.cnf
Screenshot from 2017-06-09 10-49-31.png
/usr/share/mysql/my-huge.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-large.cnf

cp /usr/share/mysql/my-lage.cnf /etc/my.cnf.d/server.cnf
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf.d/server.cnf
cp /usr/share/mysql/my-large.cnf /etc/my.cnf.d/server.cnf
cp /usr/share/mysql/my-innodb-heavy-4G.cnf /etc/my.cnf.d/server.cnf
Screenshot from 2017-06-09 10-53-04.png


vi /etc/my.cnf.d/server.cnf
Screenshot from 2017-06-09 10-54-09.png
[client]
default-character-set = utf8
[mysqld]
character-set-server = utf8
Screenshot from 2017-06-09 10-55-55.png

 
サーバ起動
sudo systemctl start mariadb
Screenshot from 2017-06-09 11-01-04.png

 
mysql_secure_installation
で、パスワード設定
Screenshot from 2017-06-09 11-01-52.png
Screenshot from 2017-06-09 11-02-27.png





 
mysql -u root -p
Screenshot from 2017-06-08 15-53-30.png
Show variables like 'character_set%';
Screenshot from 2017-06-08 15-54-17.png

Create Database testdb;
grant all privileges on *.* to usr1 identified by 'Passwd6';
FLUSH PRIVILEGES;
exit
Screenshot from 2017-06-08 15-56-28.png



 


posted by a23 at 13:44| Comment(0) | MySQL

2017年06月07日

CentOS7 MariaDB 5.5.52 (バンドル)


vi /etc/my.cnf

systemctl enable mariadb.service

systemctl start mariadb.service

mysql_secure_installation


mysql -u root -p

Screenshot from 2017-06-07 14-34-48.png

SHOW variables like 'character_set%';
Screenshot from 2017-06-07 14-34-48.png
文字コードりセットは、最初にやっておく。


Screenshot from 2017-06-08 13-17-58.png

ls /usr/share/mysql/my*.cnf
Screenshot from 2017-06-07 16-35-13.png



/usr/share/mysql/my-huge.cnf
/usr/share/mysql/my-medium.cnf
/usr/share/mysql/my-innodb-heavy-4G.cnf
/usr/share/mysql/my-small.cnf
/usr/share/mysql/my-large.cnf

cp /usr/share/mysql/my-lage.cnf /etc/my.cnf.d/server.cnf
cp /usr/share/mysql/my-huge.cnf /etc/my.cnf.d/server.cnf
cp /usr/share/mysql/my-large.cnf /etc/my.cnf.d/server.cnf
cp /usr/share/mysql/my-innodb-heavy-4G.cnf /etc/my.cnf.d/server.cnf

vi /etc/my.cnf.d/server.cnf
[client]
default-character-set = utf8
[mysqld]
character-set-server = utf8






https://downloads.mariadb.org/mariadb/repositories/#mirror=yamagata-university&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.1

CentOS7のMariaDB5.5を10.1にアップグレードする
http://qiita.com/egnr-in-6matroom/items/6dbb684ff03a228947bd



/etc/yum.repos.d/MariaDB.repo
-------------------------------------------------------------------------------------
# MariaDB 10.1 CentOS repository list

[mariadb]
name = MariaDB
gpgcheck=1
-------------------------------------------------------------------------------------
sudo systemctl stop mariadb
sudo yum update mariadb-server -y
sudo systemctl start mysql


SHOW variables like 'character_set%';
Screenshot from 2017-06-07 17-12-18.png



posted by a23 at 14:30| Comment(0) | MySQL