Hi all,
for some reason my db refuses to work. sometimes it says:
Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (11).
but a few seconds later it stands up and there’s no need to start the server.
Nothing gets logged into the error log (enabled in my.cnf). and I’m really frustrated cuz I don’t have an idea how to check what’s going on.
Please help.
BTW,
I’m on ubuntu, using MyISAM tables. This is my config file:
Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
Here is entries for some specific programs
The following values assume you have at least 32M ram
This was formally known as [safe_mysqld]. Both versions are currently parsed.
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
#open_files_limit =20000
[mysqld]
* Basic Settings
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
max_connections=600
#skip-networking
skip-name-resolve
ft_min_word_len=3
For compatibility to other Debian packages that still use
libmysqlclient10 and libmysqlclient12.
old_passwords = 1
Instead of skip-networking the default is now to listen only on
localhost which is more compatible and is not less secure.
#bind-address = 10.5.182.2
bind-address = 127.0.0.1
* Fine Tuning
key_buffer = 128M
max_allowed_packet = 16M
thread_stack = 128K
* Query Cache Configuration
query_cache_limit = 1048576
query_cache_size = 52428800
query_cache_type = 1
* Logging and Replication
Both location gets rotated by the cronjob.
Be aware that this log type is a performance killer.
#log = /var/log/mysql.log
log-error = /var/log/mysql/mysql-new6.err
Error logging goes to syslog. This is a Debian improvement )
Here you can see queries with especially long duration
#log-slow-queries = /var/log/mysql/mysql-slow.log
The following can be used as easy to replay backup logs or for replication.
#server-id = 1
#log-bin = /var/log/mysql/mysql-bin.log
#expire-logs-days = 20
#max_binlog_size = 104857600
#binlog-do-db = include_database_name
#binlog-ignore-db = include_database_name
* BerkeleyDB
According to an MySQL employee the use of BerkeleyDB is now discouraged
and support for it will probably cease in the next versions.
skip-bdb
skip-innodb
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
[isamchk]
key_buffer = 16M