Recreate mysql root user on Ubuntu [duplicate]
This question already has an answer here:
How to reset or recover admin account password for MySql? 2 answers
I'm dealing with a box where mysql root was removed.
dpkg-reconfigure mysql-server-5.5 asks for a new root password but then it
doesn't actually create a new root user.
I stopped mysqld and then started it with --skip-grant-tables:
# mysqld_safe --skip-grant-tables --skip-networking
Then launch mysql client:
# mysql
mysql> USE mysql
mysql> CREATE USER root@localhost;
RROR 1290 (HY000): The MySQL server is running with the
--skip-grant-tables option so it cannot execute this statement
lolwut?
No comments:
Post a Comment