盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

MySQL5.6在Centos6.5下安装图文说明教程

时间:2025/3/16作者:未知来源:盾怪网教程人气:

[摘要]这篇文章主要介绍了Centos 6.5下安装MySQL 5.6教程,非常不错,具有参考借鉴价值,需要的朋友可以参考下1.下载Linux对应的RPM包2.解压tar包tar -xvf MySQL-5....
这篇文章主要介绍了Centos 6.5下安装MySQL 5.6教程,非常不错,具有参考借鉴价值,需要的朋友可以参考下

1.下载Linux对应的RPM包

2.解压tar包

tar -xvf MySQL-5.6.33-1.el6.x86_64.rpm-bundle.tar

3.安装MySQL

rpm -ivh MySQL-server-5.6.33-1.el6.x86_64.rpm 
rpm -ivh MySQL-client-5.6.33-1.el6.x86_64.rpm 
rpm -ivh MySQL-devel-5.6.33-1.el6.x86_64.rpm

如果出现:

error: Failed dependencies:
    libaio.so.1()(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64
    libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64
    libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64

下载libaio

yum install libaio

如果出现:

error: Failed dependencies:
    libnuma.so.1()(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64
    libnuma.so.1(libnuma_1.1)(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64
    libnuma.so.1(libnuma_1.2)(64bit) is needed by MySQL-server-5.6.33-1.el6.x86_64

下载numactl

yum install numactl

4.初始化MySQL及设置密码

/usr/bin/mysql_install_db
service mysql start

如果启动失败可能是数据块所在目录没有权限

cat /root/.mysql_secret #查看root账号密码
mysql> SET PASSWORD = PASSWORD('123456');
mysql> exit

如果.mysql_secret文件不存在,先停止MySQL进入安全模式设置密码

service mysql stop
mysqld_safe --skip-grant-tables&
mysql -u root mysql
mysql> UPDATE user SET password=PASSWORD("new password") WHERE user='root';
mysql> FLUSH PRIVILEGES;

5.允许远程登陆

mysql> use mysql;
mysql> select host,user,password from user;
mysql> update user set host='%' where user='root' and host='localhost';
mysql> flush privileges;
mysql> exit

6.设置开机自启动

chkconfig mysql on
chkconfig --list 

关键词:MySQL5.6在Centos6.5下安装图文详细教程




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版