ITPub博客

首页 > 数据库 > MySQL > linuxyum安装mariadb(mysql)报错及解决方案

linuxyum安装mariadb(mysql)报错及解决方案

原创 MySQL 作者:pujh 时间:2015-12-22 17:28:38 0 删除 编辑

yum安装mariadb(mysql)报错及解决方案


1.错误一: Could not retrieve mirrorlist http://mirrorlist.centos.org/

在执行时yum install mysql-community-server-5.7.10-1.el7.x86_64.rpm报出:

原因:系统自带的yum命令不完整,需要连网

解决:重新安装yum,不要嫌麻烦,安装好了以后安装其它软件就是一个命令搞定的事,都不用去下载安装包

如何安装:http://blog.itpub.net/29827022/viewspace-1876981/

因为我自己用rpm安装mysql老是出问题,经人提醒说cenos7自带的是mariadb(mysql的一个分支,即开源mysql),就转而安装mariadb

yum -y install mariadb* 


2.错误二:Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.

在执行时systemctl start mariadb.service报错

root@localhost:/var/log/mariadb>cat mariadb.log

151221 22:41:16 InnoDB: Completed initialization of buffer pool

InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes

InnoDB: than specified in the .cnf file 0 5242880 bytes!

151221 22:41:16 [Note] Plugin 'FEEDBACK' is disabled.

151221 22:41:16 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

将/var/lib/mysql/ ib_logfile0, ib_logfile1手动删除再mysql_upgrade报下面第三个错误

 

3.错误三:Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

运行mysql_upgrade时mariadb.log中报错

解决:运行mysql_install_db --user=mysql --ldata=/var/lib/mysql/

具体原因不知

再运行:systemctl start mariadb.service居然不报错了,oh my god终于可以睡个安稳觉咯

root@localhost:/var/log/mariadb>ps -ef|grep -i mariadb*

mysql      4896   4739  0 Dec21 ?        00:00:04 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/log/mariadb/mariadb.log --pid-file=/var/run/mariadb/mariadb.pid --socket=/var/lib/mysql/mysql.sock

root       7434   4475  0 01:26 pts/1    00:00:00 grep --color=auto -i mariadb.log

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29827022/viewspace-1877014/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-08-25

  • 博文量
    8
  • 访问量
    44276