jayrick213 Posted April 11, 2013 Posted April 11, 2013 is there anybody can help how to make a fake root password in phpmysql, i accedentaly deleted my root user thats why i cant login to phpmyadmin.. thanks in advance.. Quote
Brian Posted April 11, 2013 Posted April 11, 2013 is there anybody can help how to make a fake root password in phpmysql, i accedentaly deleted my root user thats why i cant login to phpmyadmin.. thanks in advance..I'm guessing YOU are hosting your MySQL Server.Here are instructions (for both Windows and Linux) to Reset the MySQL root password Since you need to re-create the root user, for step 3 you would use this query instead: CREATE USER 'root'@'localhost'; GRANT ALL ON *.* TO 'root'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; Quote
Mootie Posted April 11, 2013 Posted April 11, 2013 If you are hosting to asurahosting or somewhere else you can ask your provider to reset it for you. Quote
Asura Posted April 14, 2013 Posted April 14, 2013 Hi Brian, From my own experience; there is no way to re-create a full 'root' account after it has been deleted. Even with running MySQL in safe mode and the option to skip privileges, it would not allow you to re-create that 'root' with "All Privileges". I would use the following syntax to re-create the closest thing to 'root'; INSERT INTO `mysql`.`user`(`Host`, `User`, `Password`, `Select_priv`, `Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`, `Reload_priv`, `Shutdown_priv`, `Process_priv`, `File_priv`, `Grant_priv`, `References_priv`, `Index_priv`, `Alter_priv`, `Show_db_priv`, `Super_priv`, `Create_tmp_table_priv`, `Lock_tables_priv`, `Execute_priv`, `Repl_slave_priv`, `Repl_client_priv`, `Create_view_priv`, `Show_view_priv`, `Create_routine_priv`, `Alter_routine_priv`, `Create_user_priv`, `ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`, `max_questions`, `max_updates`, `max_connections`, `max_user_connections`) VALUES ('%', 'root', PASSWORD('password_is_here'), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', '0', '0', '0', '0'); Quote
Question
jayrick213
is there anybody can help how to make a fake root password in phpmysql, i accedentaly deleted my root user thats why i cant login to phpmyadmin.. thanks in advance..
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.