#### 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 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 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’;

flush privileges;


The site was back smiling again!

mysql database

mysql

#### LAMP in one command

##### August 6, 2012
linux mysql opensuse ubuntu apache php