形腿望舞 发表于 2024-9-11 18:06:56

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

安装过程遇到不少问题, 最终解决,下面分享下,希望对各位朋友有一定帮助。一、下载mysql服务端、客户端、库和包含文件、模块
wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.5.30-1.el6.x86_64.rpm/from/http://mysql.spd.co.il/wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-5.5.30-1.el6.x86_64.rpm/from/http://mysql.spd.co.il/wget -c http://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-devel-5.5.30-1.el6.x86_64.rpm/from/http://mysql.spd.co.il/二、安装mysql服务端、客户端、库和包含文件、模块
rpm -ivh MySQL-server-5.5.30-1.el6.x86_64.rpm --nodeps --force rpm -ivh MySQL-client-5.5.30-1.el6.x86_64.rpm --nodeps --force rpm -ivh MySQL-devel-5.5.30-1.el6.x86_64.rpm --nodeps --force
安装好mysql发现无法启动查看日志,提示:加载共享库时出错xxxxxxxxxxxx 缺少libaio 错误如下:
# service mysql startStarting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/MyCloudServer.pid).# 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 directory150703 13:45:11 mysqld_safe mysqld from pid file /var/lib/mysql/MyCloudServer.pid ended三、安装libaio
yum install libaio
安装好后还是提示错误,错误如下:
InnoDB: Foreign key constraint system tables created150703 13:48:26 InnoDB: Waiting for the background threads to start150703 13:48:27 InnoDB: 5.5.30 started; log sequence number 0150703 13:48:27 Server hostname (bind-address): '0.0.0.0'; port: 3306150703 13:48:27 - '0.0.0.0' resolves to '0.0.0.0';150703 13:48:27 Server socket created on IP: '0.0.0.0'.150703 13:48:27 Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist150703 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数据库,上为本人安装过程。
页: [1]
查看完整版本: centos单独安装mysql5.5数据库和安装报错处理过程分享!