Sunday, September 24, 2006

Mysql, mysqld.sock missing

Lately I find my self in trouble with running mysqld 4 on Ubuntu 5.10. The problem was with missing mysqld.sock. While starting mysql I saw:

/usr/bin/mysqladmin: connect to server at 'localhost' failed error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock (2)' Check that mysql is running and that the socket: //var/run/mysqld/mysqld.sock' exists !

Normally mysqld.sock is created by running mysqld command. Unfortunately, this command gave:

/usr/sbin/mysqld: Cant't open file: 'host:MYI'. (errno: 142) Fatal error: Can't open privilege tables: File = '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)

First I tried mysqld --default-character-set=latin1 but it did not help. So I finaly executed

myisamchk -dvv host.MYI

and I saw

myisamchk: Character set '#'83' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file myisamchk: error: 142 when opening MyISAM-table 'host.MYI'

The solution was to add to file /usr/share/mysql/charsets/Index only one line:

cp1251 83

1 comment:

  1. Detail of the problem and solution is here at http://www.geteasypeasy.com/forums/viewtopic.php?f=12&t=2920&p=9896&e=9896

    ReplyDelete