For some reason my /var/run/ dir on debian6 had it's chown and chmod changed. Problem is from what? Outcome is that mysql fails. I'm guessing the easiest way to fix is to reinstall MySQL. (Previously this LAMP was running fine.)
However, I have established databases and tables and don't want to lose them. Since mysql is not running I can't backup (correct?).
I just want to confirm that:
1). if I reinstall, I won't loose my databases.
apt-get install mysql-server mysql-client is the correct command to use.
/var/log/syslog output when running
mysqld_safe: Starting mysqld daemon with databases from /var/lib/mysql mysqld: 130109 10:44:10 [Note] Plugin 'FEDERATED' is disabled. mysqld: #007/usr/sbin/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13) mysqld: 130109 10:44:10 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. mysqld: 130109 10:44:10 InnoDB: The InnoDB memory heap is disabled mysqld: 130109 10:44:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins mysqld: 130109 10:44:10 InnoDB: Compressed tables use zlib 18.104.22.168 mysqld: 130109 10:44:10 InnoDB: Using Linux native AIO mysqld: 130109 10:44:10 InnoDB: Initializing buffer pool, size = 128.0M mysqld: 130109 10:44:10 InnoDB: Completed initialization of buffer pool mysqld: 130109 10:44:10 InnoDB: Operating system error number 13 in a file operation. mysqld: InnoDB: The error means mysqld does not have the access rights to mysqld: InnoDB: the directory. mysqld: InnoDB: File name ./ibdata1 mysqld: InnoDB: File operation call: 'create'. mysqld: InnoDB: Cannot continue operation. mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended /etc/init.d/mysql: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in /etc/init.d/mysql: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed /etc/init.d/mysql: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' /etc/init.d/mysql: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! /etc/init.d/mysql: