ERROR 1396 (HY000): Operation CREATE USER failed

February 16, 2013
mysql

It’s still fresh in memory, so I thought of blogging it right away. A couple of minutes back while migrating legacy.hacklog.in on the new VPS, I had some trouble restoring it’s db. I dumped all the databases from the old VPS and restored on the new one without error warnings. I assumed everything went fine. But the site, i.e legacy.hacklog.in would not show up. Instead it would display “Error establishing database connection”.

I checked … and yes I was not able to log in MySQL using the db account. The user entry was there but it would still show error when logging.

Finally, to get around I just had to delete the user and recreate again, granting all privileges.

delete from mysql.user where user=’urUsername’;
delete from mysql.db where user=’urUsername’;

grant all privileges on urDatabase.* to ‘urUsername’@’urHost’ identified by ‘urPassword’;

flush privileges;

The site was back smiling again!

InnoDB Error Log File is of Different Size

May 19, 2013
mysql database

Verify MySQL version

October 2, 2012
mysql

LAMP in one command

August 6, 2012
linux mysql opensuse ubuntu apache php