1. 程式人生 > >msyql5.6與mysql5.7安裝區別

msyql5.6與mysql5.7安裝區別

mysql 5.7安裝
tar xf mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz mv mysql-5.7.17-linux-glibc2.5-x86_64 /opt/mysql yum install -y compat-libstdc++-33 libaio libaio-devel useradd -M -s /sbin/nologin mysql mkdir -p /home/mysql/3306/{data,logs,binlog} chown -R mysql:mysql /home/mysql cd /opt/mysql ./bin/mysqld --defaults-file=/opt/mysql/conf/my3306.cnf --initialize --user=mysql --basedir=/opt/mysql --datadir=/home/mysql/3306/data #/opt/mysql/conf/my3306.cnf 連結:http://www.cnblogs.com/hanxiaohui/p/8669980.html #修改/opt/mysql/bin/mysqld_safe :1,
[email protected]
/[email protected]@g /opt/mysql/scripts/my3306.sh start #指令碼連結:http://www.cnblogs.com/hanxiaohui/p/8399191.html 登陸修改密碼 #skip-grant-tables 重啟 update mysql.user set authentication_string=password('123456') where user='root'; flush privileges; 初次登陸後需要執行: SET PASSWORD = PASSWORD('123456');這句話重新設定一次密碼,不然什麼都操作不了


mysql 5.6安裝、

tar xf mysql-5.6.33-linux-glibc2.5-x86_64.tar.gz

mv mysql-5.6.33-linux-glibc2.5-x86_64 /opt/mysql

yum install -y compat-libstdc++-33 libaio libaio-devel

useradd -M -s /sbin/nologin mysql

mkdir -p /home/mysql/3306/{data,logs,binlog}

chown -R mysql:mysql  /home/mysql

cd /opt/mysql

./scripts/mysql_install_db --user=mysql --datadir=/home/mysql/3306/data
#/opt/mysql/conf/my3306.cnf 連結:http://www.cnblogs.com/hanxiaohui/p/8399161.html
#修改/opt/mysql/bin/mysqld_safe  :1,
[email protected]
/[email protected]@g /opt/mysql/scripts/my3306.sh start #指令碼連結:http://www.cnblogs.com/hanxiaohui/p/8399191.html 登陸修改密碼 裝好是沒有密碼的 update mysql.user set password=password('123456') where user='root'; flush privileges; 授權 grant all on *.* to 'root'@'%' identified by '123456'; flush privileges;