MySQL Forums
Forum List  »  Newbie

Re: unable to create database even as root user
Posted by: siva balan
Date: March 06, 2012 06:13AM

Thank you Rick James,Scot Nemes,Sam Smith and Deepak,

Problem is sloved now.

root@localhost#service mysqld stop
root@localhost#mysqld_safe --skip-grant-tables &
root@localhost#mysql
mysql>select user,host,password from mysql.user

+--------------+------------------------+------------------+
| user | host | password |
+--------------+------------------------+------------------+
| root | localhost | mypassword |
| root | 127.0.0.1 | mypassword |
| | localhost | |
+--------------+------------------------+------------------+
look at the 3rd row.
mysql>delete from user where user='';
Query OK, 1 rows affected (0.00 sec)

mysql>update mysql.user set password=PASSWORD('mynewpassword') where user='root';
Query OK, 2 rows affected (0.00 sec)

mysql>exit;

root@localhost#service mysqld stop
root@localhost#service mysqld start
root@localhost#mysql -u root -p
password:<mynewpassword>
mysql>create database a;
Query OK, 1 row affected (0.02 sec)

how this 3rd row came? i am wondering..
anyway, once again thank you very much to all of you..



Edited 1 time(s). Last edit at 03/06/2012 06:14AM by siva balan.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.