HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   MySQL problem (http://www.howtoforge.com/forums/showthread.php?t=60563)

dimas 14th February 2013 14:43

MySQL problem
 
Hello everybody, I have a big problem on a production server (ISPConfig 3.0.4.6, Debian Squeeze 64-bit, Perfect Setup)

I noticed that I can't create new mysql databases via ISPConfig interface. A line with a new database actually appears, but no new database is actually created - and there's nothing new in /var/lib/mysql

I tried to log in as mysql root user via shell - and there was another nasty surprise - it said access denied (wrong credentials)!

So something - or someone - changed my root mysql password.

I still CAN login as other regular mysql users.

I tried to reset the root user password by using this howto:

http://www.howtoforge.com/reset-forg...-root-password

but this line

mysqld_safe --skip-grant-tables

doesn't start mysql, it just hangs...

So - was the server hacked, or something just went wrong?

Is there a way to somehow revive the server?

I'd welcome any advice!

till 14th February 2013 15:09

Quote:

doesn't start mysql, it just hangs...
Thats ok, the prompt does not return when mysql runs. Please see guide from ispconfig faq, you have to add a & after the command to send it to background so that you can continue with the next commands:

http://www.faqforge.com/linux/contro...root-password/

dimas 14th February 2013 16:13

Dear Till, thank you, but this is what is happening:

root@server2:~# /etc/init.d/mysql stop
Stopping MySQL database server: mysqld.
root@server2:~# mysqld_safe –skip-grant-tables &
[1] 5790
root@server2:~# 130214 19:07:47 mysqld_safe Logging to syslog.
130214 19:07:47 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130214 19:07:52 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

- and no prompt appears (I waited a long time)

If I try to input the next command from another shell window, I get:

root@server2:~# mysql -u root mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

till 14th February 2013 16:27

Quote:

- and no prompt appears (I waited a long time)
Thats ok, the mysql program has no prompt. It just starts and gets to the background as ID [1] 5790.

Quote:

If I try to input the next command from another shell window, I get:

root@server2:~# mysql -u root mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


All times are GMT +2. The time now is 08:04.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.