【mysql】配置MySQL,解决安装过程中的问题
2017-08-16 22:05
393 查看
在文章,Centos6.2中mysql的安装与配置中,使用yum的方式安装了mysql 。再次安装的时候跟系统的环境有关系,遇到了不少问题。记录一下。
yum 安装 出错 Error: Protected multilib versions:
file /usr/share/man/man1/mysqlshow.1.gz from install of mysql-5.1.73-8.el6_8.x86_64 conflicts with file from package MySQL-client-5.5.48-1.linux2.6.i386
file /usr/share/man/man1/mysqlslap.1.gz from install of mysql-5.1.73-8.el6_8.x86_64 conflicts with file from package MySQL-client-5.5.48-1.linux2.6.i386
解决方案:rpm -e mysql-server-5.1.73-8.el6_8.x86_64 --nodeps
170721 22:25:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
170721 22:25:03 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170721 22:25:03 InnoDB: Initializing buffer pool, size = 8.0M
170721 22:25:03 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
170721 22:25:03 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
170721 22:25:03 InnoDB: Started; log sequence number 0 1595675
170721 22:25:03 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
170721 22:25:03 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170721 22:25:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
170721 22:25:24 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170721 22:25:24 InnoDB: Initializing buffer pool, size = 8.0M
170721 22:25:24 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
170721 22:25:24 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
170721 22:25:24 InnoDB: Started; log sequence number 0 1595675
170721 22:25:24 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
170721 22:25:24 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170721 22:25:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
170721 22:25:37 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
安装完启动的时候遇到上述问题。
解决方案:rm -rf /var/lib/mysql
登陆mysql
[root@root opt]# mysql -u root password fxq123
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
解决方案:使用mysql -uroot -proot
一旦登录之后,可以修改用户的账号和密码,
查看用户授权表:select user,host,password from mysql.user;
给用户设置密码:update mysql.user set password=PASSWORD('root') where user='root';
flush privileges;
yum 安装 出错 Error: Protected multilib versions:
file /usr/share/man/man1/mysqlshow.1.gz from install of mysql-5.1.73-8.el6_8.x86_64 conflicts with file from package MySQL-client-5.5.48-1.linux2.6.i386
file /usr/share/man/man1/mysqlslap.1.gz from install of mysql-5.1.73-8.el6_8.x86_64 conflicts with file from package MySQL-client-5.5.48-1.linux2.6.i386
解决方案:rpm -e mysql-server-5.1.73-8.el6_8.x86_64 --nodeps
170721 22:25:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
170721 22:25:03 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170721 22:25:03 InnoDB: Initializing buffer pool, size = 8.0M
170721 22:25:03 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
170721 22:25:03 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
170721 22:25:03 InnoDB: Started; log sequence number 0 1595675
170721 22:25:03 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
170721 22:25:03 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170721 22:25:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
170721 22:25:24 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170721 22:25:24 InnoDB: Initializing buffer pool, size = 8.0M
170721 22:25:24 InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
170721 22:25:24 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
170721 22:25:24 InnoDB: Started; log sequence number 0 1595675
170721 22:25:24 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
170721 22:25:24 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
170721 22:25:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
170721 22:25:37 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
安装完启动的时候遇到上述问题。
解决方案:rm -rf /var/lib/mysql
登陆mysql
[root@root opt]# mysql -u root password fxq123
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
解决方案:使用mysql -uroot -proot
一旦登录之后,可以修改用户的账号和密码,
查看用户授权表:select user,host,password from mysql.user;
给用户设置密码:update mysql.user set password=PASSWORD('root') where user='root';
flush privileges;
相关文章推荐
- mysql免安装版安装配置过程中遇到的问题和相关的解决
- mysql5.7.19在centos虚拟机下手动(离线)安装配置过程与一些问题解决办法
- 【问题请教】MySQL数据源配置过程中出现的问题===此问题已经解决!
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法
- phpMyAdmin安装配置方法全过程,及问题解决
- phpMyAdmin安装配置方法全过程,及问题解决
- 安装配置Mysql5.5并且完美解决中文乱码问题
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法【
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法【已验证
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法
- phpMyAdmin安装配置方法全过程,及问题解决
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法【已验证 】
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法【已验证 】
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法
- phpMyAdmin安装配置方法全过程,及问题解决
- 解决mysql安装过程中 the service could not be started.Error:0的问题
- phpMyAdmin安装配置方法全过程,及问题解决
- phpMyAdmin安装配置方法全过程,及问题解决
- Ubuntu无网环境mysql安装配置问题解决
- SQL Server 2008 安装过程中遇到“性能计数器注册表配置单元一致性”检查失败 问题的解决方法