0

I have a server that runs Debian 6.2, with Apache, PHP5, and MySQL.

Well, I hadn't done anything with MySQL at all so far, just Apache and PHP; I must have installed it (mysql-server) at some point along the line, and I decided to login to the database for the first time a couple days ago as I was considering using the database for a future website project.

I noticed that the "root" user had a password, and I didn't recall having set one. My usual root password was incorrect. So I attempted to reset the password.

sudo service mysql stop

(stopped successfully)

sudo /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &

started successfully, from what I can tell. However,

mysql

itself returns "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld,sock' (2)", and additionally

sudo service mysql start

returns "/etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full! ... failed!"

df -h tells me that / is 26% used, a 20GB partition, and /home, roughly 900GB, has only 5% usage.

On a potentially related note, I've been experiencing random hangs since I noticed this problem, my tty2 randomly froze several times while idle, and the entire system is suddenly unstable. gnome-terminal also does not open. (Gnome-terminal apparently works now, disregard that part, but the server is still being somewhat unstable, I randomly lost connection when I was SSHed into it from my laptop, twice now.)

3
  • You started mysql with sudo /usr/bin/mysqld_safe --skip-grant-tables --skip-networking did mysqld actually start?. Did you manually kill that process before trying to start it again? You can't run two copies of mysql at once.
    – Zoredache
    Nov 29, 2012 at 23:03
  • What about the size of the /var partition?
    – mdpc
    Nov 29, 2012 at 23:13
  • it seemed to start when I used mysqld_safe, but when I switched terminals I still could not log in to mysql, with the same error 2002.
    – gdea73
    Nov 30, 2012 at 4:30

1 Answer 1

1

Forget the error you are asking about. You have zeroed in on just one symptom when your system clearly has a lot of issues and there is enough in your message to indicate that it may have been compromised. I suggest you nuke the system, test the hardware, paying particular attention to the drives, and if all is well, reinstall from scratch and restore your data from the backup. Don't forget to investigate the possible compromise.

2
  • This may be the case, I should probably nuke the install. Granted having to reconfigure all that I'd set up on there may be tedious, it is in need of a reformat. Granted, the being locked out of MySQL part I still find puzzling, when I purged MySQL and its database and reinstalled mysql-server, it already had a root password that I had not configured. But yep, time to dismantle my server again.
    – gdea73
    Nov 30, 2012 at 4:31
  • If a reinstall is tedious because it requires you to reconfigure things then you need to examine your backup strategy. In the worst case a reinstall should be nothing more than a base install of the OS with everything else, including all your configurations and installs, brought back from the backup. Nov 30, 2012 at 5:20

Not the answer you're looking for? Browse other questions tagged .