This is my first post asking for help so I hope I can help you help me.
Basically I don't know how I got to this point but mysql daemon will not start.
Code: Select all
[root@nx7 ~]# service mysqld restart
Stopping mysqld: [ OK ]
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
1. it worked before
2. I don't remember what I might have done to break it
3. I am logged in as root via ssh from my local area network
MyCentOS version: CentOS 6.5
when I type mysql I get:
Code: Select all
[root@nx7 ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
nano /var/log/mysqld.log
Code: Select all
140115 17:20:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140115 17:20:01 InnoDB: Initializing buffer pool, size = 8.0M
140115 17:20:01 InnoDB: Completed initialization of buffer pool
140115 17:20:01 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.
140115 17:20:01 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140115 17:21:35 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140115 17:21:35 InnoDB: Initializing buffer pool, size = 8.0M
140115 17:21:35 InnoDB: Completed initialization of buffer pool
140115 17:21:35 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.
140115 17:21:35 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140115 19:52:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140115 19:52:43 InnoDB: Initializing buffer pool, size = 8.0M
140115 19:52:43 InnoDB: Completed initialization of buffer pool
140115 19:52:43 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.
Code: Select all
[root@nx7 ~]# restorecon -R /var/lib/mysql/
Code: Select all
[root@nx7 ~]# chcon -R --type=mysql_db_t /var/lib/mysql
chcon: failed to change context of `mysql' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `owncloud' to `system_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `ibdata1' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `pureftpd' to `system_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `SAMS' to `system_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `ib_logfile0' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `dbispconfig' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `c1aps1' to `system_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `ib_logfile1' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
Code: Select all
[root@nx7 ~]# chcon -R --type=mysql_db_t /var/lib/mysql
chcon: failed to change context of `mysql' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `owncloud' to `system_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `ibdata1' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `pureftpd' to `system_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `SAMS' to `system_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `ib_logfile0' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `dbispconfig' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `c1aps1' to `system_u:object_r:mysql_db_t:s0': Operation not permitted
chcon: failed to change context of `ib_logfile1' to `unconfined_u:object_r:mysql_db_t:s0': Operation not permitted
I also have ownCloud installed, of course login is not working
Also run SAM Broadcaster which uses this database, no longer connecting obviously...
Centocast (new install)
SHOUTcast (my little local shoutcast server which is not really affected)
So I do have quite a few things I don't really want to lose. Maybe my mysql is screwed for good?
Again, I am ssh´d in via LAN as root.
Any help is appreciated. I don't really want to format the box and start from scratch
Eduardo