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

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自带的是mariadbmysql的一个分支,即开源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_upgrademariadb.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博客 ” ,链接:http://blog.itpub.net/29827022/viewspace-1877014/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29827022/viewspace-1877014/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值