CentOS安装Mysql5.7.18的教程详解

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的教程详解,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对编程宝库网站的支持!

废话不多说了,直接给大家贴代码了,具体代码如下所示:#安装依赖包yum search libaio # search for infoyum install libaio # install l ...