6,893 pts.
 Adding a MySQL user when no MySQL users have admin rights?
I'm working on a MySQL installation that has a user already created ("admin"), but that user doesn't have a password, and doesn't have any permissions, so I can't create new users or even reset the password of that user.
I'm using Ubuntu Server, and after looking through the help files I still can't find a way to add a user when the only existing user has no permissions. Am I missing something basic? Is there a way to add a super user from the command line before going into the MySQL command line?
Thanks!


Software/Hardware used:
ASKED: April 27, 2011  6:33 PM
UPDATED: April 28, 2011  7:39 AM
  Help
 Approved Answer - Chosen by Michael Morisy (Question Asker)

Yes, u may add a Super user Try out this....
First, stop the mysql service by: /etc/init.d/mysql stop

Now, start mysql in safe mode in background.....
/usr/bin/mysqld_safe --skip-grant-tables &

Now pass the command as: mysql --user=root mysql
From here u may set the new one on mysql prompt....
mysql> update user set Password=PASSWORD WHERE User='root';
Again, pass the command as: flush privileges;
then type as: exit

ANSWERED:  Apr 28, 2011  7:39 AM (GMT)  by Michael Morisy

 
Other Answers:
Last Wiki Answer Submitted:  June 28, 2012  12:33 am  by    0 pts.
Latest Answer Wiki Contributors: 
To see other answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _