gaining admin access to mysql
Posted by: alon s
Date: June 21, 2005 07:25AM

Hello,

Here is my problem and what i did until now:

a hosting company with a mysql server but root user password is lost.

what i did is i stopped the mysql service,
i ran the following commands:

mysqld-nt --skip-grant-tables

mysqladmin -u root flush-privileges password "test"

mysqladmin -u root -p shutdown

so far so good. it recognized the new password and shutdown the server.

then i wanted to create a control user for phpmyadmin.

so here is what i did:

mysql -u root –p

GRANT USAGE ON mysql.* TO 'steve'@'localhost' IDENTIFIED BY 'blabla';

GRANT SELECT (
Host, User, 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
) ON mysql.user TO 'steve'@'localhost';
GRANT SELECT ON mysql.db TO 'steve'@'localhost';
GRANT SELECT ON mysql.host TO 'steve'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO 'steve'@'localhost';

everything went ok.
i restarted the server (windows 2003)
and then.. poof... mysql service ran automatically as always but forgot everything i did so far and i couldnt log in the with new password i creating from command line or phpmyadmin.

what do i do?

Options: ReplyQuote


Subject
Written By
Posted
gaining admin access to mysql
June 21, 2005 07:25AM


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.