mysql stopped working

am getting Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
 
there is nothing in my my.cnf file..not no mysql.sock file

in my.cnf its showing

[mysqld]
local-infile=0
 
Hello,

Sir please type this command in ssh:

killall mysqld
killall -9 mysqld
/etc/init.d/mysqld start

Best regards,
Fidan Mirena
gfxMedia Creative Agency
 
Add this line



in



When you add this line it will create mysql.sock in your tmp dir.

# /etc/init.d/mysqld restart

This solution works.

am getting this msg

/$ /etc/init.d/mysqld restart
Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]


Also in Directadmin mysql management am getting

Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

site is down showing db error
 
Last edited:
It's not really a solution to restart a server. But maybe you can do it?

But the set of permissions to 777 for the tmp folder first and restart MySQL
 
It's not really a solution to restart a server. But maybe you can do it?

But the set of permissions to 777 for the tmp folder first and restart MySQL

changed the permissions

nothing same msg again..
 
Did MySQL work before? If so, what has changed on your server?

What OS are you running there?

Check this thread: http://www.directadmin.com/forum/showthread.php?t=39128

am using debian 5.0 and yes mysql worked before..

here is wat in my host.err file
110219 20:16:02 InnoDB: Starting shutdown...
110219 20:16:07 InnoDB: Shutdown completed; log sequence number 0 43655
110219 20:16:07 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

110219 20:16:07 mysqld_safe mysqld from pid file /usr/local/mysql/data/server.pid ended
110219 20:16:11 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
110219 20:16:11 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
110219 20:16:11 [Warning] '--log_slow_queries' is deprecated and will be removed in a future release. Please use ''--slow_query_log'/'--slow_query_log_file'' instead.
110219 20:16:11 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
110219 20:16:11 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
110219 20:16:11 [Warning] '--log_slow_queries' is deprecated and will be removed in a future release. Please use ''--slow_query_log'/'--slow_query_log_file'' instead.
110219 20:16:11 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
110219 20:16:11 [Note] Plugin 'FEDERATED' is disabled.
110219 20:16:11 InnoDB: Initializing buffer pool, size = 512.0M
110219 20:16:12 InnoDB: Completed initialization of buffer pool
110219 20:16:12 InnoDB: Started; log sequence number 0 43655
110219 20:16:12 [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--skip-bdb'
110219 20:16:12 [ERROR] Aborting

110219 20:16:12 InnoDB: Starting shutdown...
110219 20:16:17 InnoDB: Shutdown completed; log sequence number 0 43655
110219 20:16:17 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

110219 20:16:17 mysqld_safe mysqld from pid file /usr/local/mysql/data/server.pid ended
 
Last edited:
Did you check the link, I've given? What has changed on your server?

Did you do any update with apt-get or aptitude? Did you install any new software with the help of them? If so try this:

Code:
aptitude purge mysql-server
aptitude purge mysql-server-5.0
aptitude purge mysql-server-5.1

and

Code:
cd /usr/local/directadmin/custombuild
./build update && ./build clean
./build set_fastest
./build set mysql_inst yes
./build set mysql_backup yes
./build mysql
 
i get this @ ./build mysql


server:/usr/local/directadmin/custombuild# ./build mysql
Dumping database admin_desiboard
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
Dumping database admin_desibyte
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
Dumping database admin_mb
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
Dumping database da_roundcube
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
Dumping database mysql
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
Dumping database test
mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
Stopping mysqld ...
Stopping mysqld: [ FAILED ]
chown: invalid user: `mysql:mysql'
chown: invalid user: `mysql:mysql'
chown: invalid user: `mysql:mysql'
Starting mysqld: [ OK ]
Giving mysqld a few seconds to start up...
chown: invalid user: `mysql'
Looking for 'mysql' as: /usr/local/mysql/bin/mysql
Looking for 'mysqlcheck' as: /usr/local/mysql/bin/mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' '--port=3306' '--socket=/var/run/mysqld/mysqld.sock'
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed
/usr/local/mysql/bin/mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
Restarting MySQL.
Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]
It is recommended to do "./build php n" after MySQL update.
server:/usr/local/directadmin/custombuild# chown: invalid user: `mysql'
 
Will this help, try to use empty /etc/my.cnf:

Code:
mv /etc/my.cnf /etc/my.cnf-bak
touch /etc/my.cnf

and re-start mysqld.
 
Will this help, try to use empty /etc/my.cnf:

Code:
mv /etc/my.cnf /etc/my.cnf-bak
touch /etc/my.cnf

and re-start mysqld.

am getting this


Stopping mysqld: [ FAILED ]
Starting mysqld: [ OK ]
server:~# chown: invalid user: `mysql'
 
server:/usr/local/directadmin/scripts# ./mysql.sh
Usage: ./mysql.sh mysqlrootpass da_dbuser da_pass
*** do not use spaces in your passwords ***
 
Back
Top