MySQL error solution collection

ERROR 1396 (HY000): Operation CREATE USER failed for 'jack'@'localhost'

 drop user jack@'localhost';

 flush privileges;

 create user admin@localhost identified by 'admins_password'
 select host, user from mysql.user;

ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

 

 If this line is present, mysql will listen ONLY to the address listed. To enable remote access, you should REMOVE this line. Be aware of the security implication this has.

 Adding bind-address =127.0.0.1 in my.cnf disables remote connection to the DB. So even if it would work (which it isn't) - that's not a good solution.

 So, comment out the "bind_address   127.0.0.1"  in file "/etc/mysql/my.cnf"

 

References:

http://stackoverflow.com/questions/5555328/error-1396-hy000-operation-create-user-failed-for-jacklocalhost

http://stackoverflow.com/questions/1673530/error-2003-hy000-cant-connect-to-mysql-server-on-127-0-0-1-111

posted on 2013-04-13 22:11  JohnChain  阅读(465)  评论(0编辑  收藏  举报

导航