I'm trying to get a lamp stack running on Backtrack 4. It looks like everything so far is working, that is linux, apache, and php, but I get an error when I login to MySQL. It looks like this:
Then I try this:
root@bt:~# mysql -u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Anyone have any ideas?
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
100216 18:52:17 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
100216 18:52:17 InnoDB: Started; log sequence number 0 43655
100216 18:52:17 [ERROR] Can't start server : Bind on unix socket: No such file or directory
100216 18:52:17 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
100216 18:52:17 [ERROR] Aborting
100216 18:52:17 InnoDB: Starting shutdown...
100216 18:52:18 InnoDB: Shutdown completed; log sequence number 0 43655
100216 18:52:18 [Note] mysqld: Shutdown complete
I got it to work by:
nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
root@bt:~# mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.67-0ubuntu6 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.