码迷,mamicode.com
首页 > 数据库 > 详细

msyql5.6与mysql5.7安装区别

时间:2018-11-26 21:00:15      阅读:278      评论:0      收藏:0      [点我收藏+]

标签:tar.gz   aio   mysq   word   date   htm   efault   script   脚本   

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,$s@usr/local@opt@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,$s@usr/local@opt@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;


msyql5.6与mysql5.7安装区别

标签:tar.gz   aio   mysq   word   date   htm   efault   script   脚本   

原文地址:https://www.cnblogs.com/fangdecheng/p/10022778.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!