Since two days I can not connect to mysql with my root account. I have no problem logging in with other accounts.
At first I thought that my server was hacked and someone changed the password. I tried reset it. For this, I had to use mysqld_safe and therefore stop mysql, which I could not do:
> sudo /etc/init.d/mysql stop Stopping MySQL database server: mysqld failed! > mysqld stop InnoDB: Unable to lock ./ibdata1, error: 11 InnoDB: Check that you do not already have another mysqld process InnoDB: using the same InnoDB data or log files. 130107 13:48:34 InnoDB: Unable to open the first data file [...] InnoDB: Error in opening ./ibdata1 130107 13:48:34 InnoDB: Operating system error number 11 in a file operation. InnoDB: Error number 11 means 'Resource temporarily unavailable'. InnoDB: Some operating system error numbers are described at InnoDB: http://dev.mysql.com/doc/refman/5.1/...ror-codes.html InnoDB: Could not open or create data files. InnoDB: If you tried to add new data files, and it failed here, InnoDB: you should now edit innodb_data_file_path in my.cnf back InnoDB: to what it was, and remove the new ibdata files InnoDB created InnoDB: in this failed attempt. InnoDB only wrote those files full of InnoDB: zeros, but did not yet use them in any way. But be careful: do not InnoDB: remove old data files which contain your precious data! 130107 13:48:34 [ERROR] Plugin 'InnoDB' init function returned error. 130107 13:48:34 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. mysqld: Too many arguments (first extra is 'stop').
MySQL was unable to read ibdata1, so I check its permissions that look right:
> ls -l /var/lib/mysql/ -rw-rw---- 1 mysql mysql 18874368 Jan 7 12:39 ibdata1 -rw-rw---- 1 mysql mysql 5242880 Jan 7 13:05 ib_logfile0 -rw-rw---- 1 mysql mysql 5242880 Jan 7 13:05 ib_logfile1
I tried moving and copying the file, for example here , without any success:
> mv /var/lib/mysql/ibdata1 /var/lib/mysql/ibdata1.bak > cp -a /var/lib/mysql/ibdata1.bak /var/lib/mysql/ibdata1
Here is the part of my.cnf
user = mysql pid-file = /var/run/mysqld/mysqld.pid socket = /var/run/mysqld/mysqld.sock port = 3306 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp LANGUAGE = /usr/share/mysql/english skip-external-locking
The data source is correct.
Also, here is what happens when I try to get MySQL status:
# sudo /etc/init.d/mysql status /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'
I found a solution to this problem on this page , but I have to log in as the root user to do this so that I can Do Not. I think the two problems are related.
Do any of you know how to fix this? Because of this, I am blocked in my work.
Thanks so much for reading this post and maybe reply to it.
Have a nice day!