mysql守护启动,MySQL守护程序无法启动-centos 6

EDIT: Look at the checkmarked answer comments to get your issue solved.

Whenever I try to start the SQLD service I get MySQL Daemon Failed to Start. I infact tried to "start" the service by doing the following:

service mysqld start

Also

When I type: mysql

I get:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

I know that there should be a mysql.sock file in that directory, so I create one. But the file just auto removes its self and I continue to get the error 2002.

I am also unable to log into PHPMyAdmin due to the error. I can access phpmyadmin page but when logging in I get: #2002 Cannot log in to the MySQL server

EDIT:

Here is my mysql.log file:

131201 13:05:07 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

131201 13:18:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

131201 13:18:18 [Note] Plugin 'FEDERATED' is disabled.

/usr/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)

131201 13:18:18 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.

131201 13:18:18 InnoDB: The InnoDB memory heap is disabled

131201 13:18:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins

131201 13:18:18 InnoDB: Compressed tables use zlib 1.2.3

131201 13:18:18 InnoDB: Using Linux native AIO

131201 13:18:18 InnoDB: Initializing buffer pool, size = 128.0M

131201 13:18:18 InnoDB: Completed initialization of buffer pool

131201 13:18:18 InnoDB: Operating system error number 13 in a file operation.

InnoDB: The error means mysqld does not have the access rights to

InnoDB: the directory.

InnoDB: File name ./ibdata1

InnoDB: File operation call: 'open'.

InnoDB: Cannot continue operation.

131201 13:18:18 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

I ran mysql_upgrade and got

Looking for 'mysql' as: mysql

Looking for 'mysqlcheck' as: mysqlcheck

FATAL ERROR: Upgrade failed

解决方案

The most likely cause for this error is that your mysql server is not running. When you type in mysql you are executing mysql client.

Try:

# sudo service mysql start

# mysql

Update (after OP included log in the question; taken from the comments below):

Thanks, saw your log. The log is saying the mysql user doesn't have

proper access rights. I'm assuming your mysql user is mysql(this can

be verified in /etc/my.cnf, execute

chown -R mysql:mysql /var/lib/mysql

and try starting mysqld again.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值