MySQL Common Errors
Error message:
InnoDB: Unable to lock./ibdata1, error: 11
Solution:
PS-Ef | grep mysqld, killing dead processes
Then restart MySQL
---------------------------------------------------------------------------------
Error message:
Error while loading shared libraries: libssl. so.0.9.8:
Solution:
Update dB and OpenSSL
Pacman-s dB, OpenSSL
In this way, the connection library file cannot be found.
---------------------------------------------------------------------------------
Mysqld cannot be started
Error message:
[Root @ philix lib] #/usr/sbin/mysqld 060715 21:16:36 [Error] fatal error: Please read "security" section of the Manual to find out how to run mysqld as root! 060715 21:16:36 [Error] aborting 060715 21:16:36 [note]/usr/sbin/mysqld: shutdown complete
Solution: Add mysqld in/etc/My. conf
User = MySQL
Note: I have encountered this error today. In addition to adding user = MySQL, you can also try/usr/bin/mysqld_safe -- user = MySQL & to start it, note the permissions of the MySQL directory.
Bytes ---------------------------------------------------------------------------------------------------------
[Error] fatal error: Can't open and lock privilege tables: Table
Solution
# Mysql_install_db
Solve MySQL "Access denied for user 'root' @ 'localhost '"
My system is ubuntu6.06. The newly installed MySQL always has an error prompt when entering the MySQL tool:
# Mysql-uroot-P
Enter password:
Error 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: No)
Use the methods described on the Internet to change the password of the root user:
# Mysqladmin-uroot-P password 'newpassword'
Enter password:
Mysqladmin: connect to server at 'localhost' failed
Error: 'Access denied for user' root' @ 'localhost' (using password: Yes )'
Now I have found the solution as follows (Please test method 3 first, thank you !) :
Method 1:
#/Etc/init. d/MySQL stop
# Mysqld_safe -- user = MySQL -- skip-grant-tables -- skip-Networking &
# Mysql-u root MySQL
Mysql> Update user SET Password = PASSWORD ('newpassword') where user = 'root ';
Mysql> flush privileges;
Mysql> quit
#/Etc/init. d/MySQL restart
# Mysql-uroot-P
Enter Password: <enter the new password newpassword>
Mysql>
Method 2:
Directly use the username and password provided in the [client] section of the/etc/MySQL/Debian. CNF file:
# Mysql-udebian-sys-Maint-P
Enter Password: <enter the password in the [client] section>
Mysql> Update user SET Password = PASSWORD ('newpassword') where user = 'root ';
Mysql> flush privileges;
Mysql> quit
# Mysql-uroot-P
Enter Password: <enter the new password newpassword>
Mysql>
Method 3:
I have not tested this method, because the default password of my root user has been modified by me. If you have time to test it, let me know the result. Thank you !!
# Mysql-uroot-P
Enter Password: <enter the password provided in [client] in the/etc/MySQL/Debian. CNF File>
At this point, many problems have been solved!