unix linux

关注公众号 jb51net

关闭
首页 > 操作系统 > unix linux > centos 安装mysql

CentOS6.5下安装Mysql5.7.18的教程详解

作者:北纬30度的博客

CentOS6.5下安装Mysql5.7.18,首先先下载mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz,传到CentOS6.5系统下的/usr/local目录下,具体执行命令大家参考下本文吧

CentOS6.5下安装Mysql5.7.18,首先先下载mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz,传到CentOS6.5系统下的/usr/local目录下,执行如下命令

yum search libaio # search for info
yum install libaio # install library
groupadd mysql
useradd mysql -g mysql
tar -zxvf /usr/local/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.7.18-linux-glibc2.5-x86_64/ mysql
cd mysql/
mkdir data
cd ../
chown -R mysql:mysql mysql/
chmod -R 755 mysql/
cd mysql
./bin/mysqld --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --initialize

查找密码,一般在命令的末尾,

2017-04-21T02:36:15.620346Z 1 [Note] A temporary password is generated for root@localhost: o*s#gqh)F4Ck
./support-files/mysql.server start
cp support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
service mysqld restart
mysql -uroot -po*s#gqh)F4Ck
alter user 'root'@'localhost' identified by 'newpswd'
update user set user.Host='%' where user.User='root';
flush privileges;

以上所述是小编给大家介绍的CentOS6.5下安装Mysql5.7.18的教程详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

您可能感兴趣的文章:
阅读全文