首页 » linux » 正文

centos单独安装mysql5.6数据库和安装报错处理过程分享!

安装过程遇到不少问题, 最终解决,下面分享下,希望对各位朋友有一定帮助。

安装过程和centos单独安装mysql5.5数据库过程分享!过程相同。

一、下载mysql服务端、客户端、库和包含文件、模块

wget -c http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-server-5.6.13-1.el6.x86_64.rpm/from/http://mysql.spd.co.il/
wget -c http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-client-5.6.13-1.el6.x86_64.rpm/from/http://mysql.spd.co.il/
wget -c http://dev.mysql.com/get/Downloads/MySQL-5.6/MySQL-devel-5.6.13-1.el6.x86_64.rpm/from/http://mysql.spd.co.il/

二、安装mysql服务端、客户端、库和包含文件、模块

rpm -ivh MySQL-server-5.6.13-1.el6.x86_64.rpm --nodeps --force 
rpm -ivh MySQL-client-5.6.13-1.el6.x86_64.rpm --nodeps --force 
rpm -ivh MySQL-devel-5.6.13-1.el6.x86_64.rpm --nodeps --force 
安装好mysql发现无法启动查看日志,提示:加载共享库时出错xxxxxxxxxxxx 缺少libaio 错误如下:
[root@MyCloudServer ~]# service mysql start
Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/MyCloudServer.pid).
[root@MyCloudServer ~]# cat /var/log/mysqld.log 
150703 13:45:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/sbin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
150703 13:45:11 mysqld_safe mysqld from pid file /var/lib/mysql/MyCloudServer.pid ended

三、安装libaio、perl 、perl-devel

1.执行:yum install libaio
2.执行:yum -y install perl perl-devel

安装好后还是提示错误,错误如下:

InnoDB: Foreign key constraint system tables created
150703 13:48:26 InnoDB: Waiting for the background threads to start
150703 13:48:27 InnoDB: 5.5.30 started; log sequence number 0
150703 13:48:27 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150703 13:48:27 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150703 13:48:27 [Note] Server socket created on IP: '0.0.0.0'.
150703 13:48:27 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
150703 13:48:27 mysqld_safe mysqld from pid file /var/lib/mysql/MyCloudServer.pid ended

四、初始化数据库

mysql_install_db

五、修改mysql数据库密码,默认空密码 直接输入mysql回车登录。

mysql>use mysql;
mysql> update user set password=passworD("test") where user='root';
mysql> flush privileges;
mysql> exit;

卸载请执行:rpm -qa | grep -i mysql 查看已安装的包 再执行rpm -e MySQL-xxxxxxxxxxxxx
本次测试系统为centos6.4 64位 成功安装mysql5.5数据库,上为本人安装过程。

本教程由铁网维原创出品 服务器运维官方网址http://www.tieww.com 欢迎大家多多关注本站 感谢大家的支持。



发表评论