Any mySQL guru's here... [Archive] - Glock Talk

PDA

View Full Version : Any mySQL guru's here...


proguncali
08-07-2005, 12:26
I have run into a recent problem.

One of my idjit contractors deleted the MySQL root user.

Am I hosed or is there help.

I've posted in the mysqlfreaks forums but no reply yet.


Thanks!

fastvfr
08-08-2005, 00:25
Care to explain how the idjit contractor gained root access to your system?! ;P ;g ;P

Depending on how you hardened it off, you may be able to get in and set root permissions for a newly created user if you use a little creativity and learn to hack Unix boxes.

One thing's for sure--you'll never look at SSL the same way again if you ARE able to do so!!

Chances are, however, that your idjit contractor has performed the ol' hoseroo on your system...

Lots of luck.

proguncali
08-08-2005, 00:34
Originally posted by fastvfr
Care to explain how the idjit contractor gained root access to your system?! ;P ;g ;P

Depending on how you hardened it off, you may be able to get in and set root permissions for a newly created user if you use a little creativity and learn to hack Unix boxes.

One thing's for sure--you'll never look at SSL the same way again if you ARE able to do so!!

Chances are, however, that your idjit contractor has performed the ol' hoseroo on your system...

Lots of luck.


Some of my guys have root. Someone made a real stupid move and no one is copping to it....yet.

It's the mySQL root just so we're clear. Not "root."

We only ssl to that box. That's the only way to connect as it's configured.

David_G17
08-08-2005, 08:36
try logging into mySQL with the user "admin". I have no idea what happens if you delete root's account. Please keep us updated if you find anything out.


edited to add...

try something like this:

ssh shell> mysql --user=admin mysql
mysql> GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password';

proguncali
08-08-2005, 11:47
Originally posted by David_G17
try logging into mySQL with the user "admin". I have no idea what happens if you delete root's account. Please keep us updated if you find anything out.


edited to add...

try something like this:

ssh shell> mysql --user=admin mysql
mysql> GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED BY 'password';


No worky....:(

GTIMANiac
08-08-2005, 13:17
My only suggestion would be to restore the mqSQL db. This is similar to the Master DB in MS SQL.

proguncali
08-08-2005, 13:47
<----looking for more of a clue?

Washington,D.C.
08-08-2005, 14:33
The documentation for MySQL notes that you can skip the MySQL authentication system on loadtime using the '--skip-grant-tables' load command. With MySQL loaded with no security, you can use either a MySQL admin gui or the MySQL commandline to reset your root password.

You can find the MySQLadmin tool from http://dev.MySQL.com/downloads/administrator/1.0.html,

The full command to load MySQL like this is:

mysqld_safe --skip-grant-tables --autoclose


For deleted root:


http://www.mysql.com/doc/R/e/Resetting_permissions.html

After starting mysql with the --skip-grant-tables, you'll have to
execute a grant statement

http://www.mysql.com/doc/G/R/GRANT.html

GRANT ALL PRIVILEGES ON *.* TO root@localhost INDENTIFIED BY
'somepassword' WITH GRANT OPTION;

then restart mysql without the --skip-grant-tables.