I'm having trouble connecting to the mysql database, MySQL Administrator is giving an error about not being able to find the socket. "Could not connect to host 'localhost'. MySQL Error Nr. 2002 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'(2)" When I use the Ping Host button it does find the host. Mike@P-733-Lin:~> rpm -q mysql mysql-5.0.67-12.11 Mike@P-733-Lin:/var/lib/mysql> ls -l total 21227 -rw-rw---- 1 mysql mysql 10485760 2009-05-16 13:44 ibdata1 -rw-rw---- 1 mysql mysql 5242880 2009-05-16 13:44 ib_logfile0 -rw-rw---- 1 mysql mysql 5242880 2009-05-16 13:09 ib_logfile1 drwx------ 2 mysql mysql 2352 2009-05-16 13:09 mysql -rw-rw---- 1 mysql mysql 19855 2009-05-16 13:09 mysql-bin.000001 -rw-rw---- 1 mysql mysql 709496 2009-05-16 13:09 mysql-bin.000002 -rw-rw---- 1 mysql mysql 925 2009-05-16 13:44 mysql-bin.000003 -rw-rw---- 1 mysql mysql 57 2009-05-16 13:09 mysql-bin.index -rw-r--r-- 1 root root 0 2009-05-16 16:41 mysqld.pid drwx------ 2 mysql mysql 72 2009-05-16 13:35 mythconverg drwx------ 2 mysql mysql 48 2009-05-16 13:09 test I see the .pid file but not the socket file. Mike@P-733-Lin:~> ls /var/run/mysql Mike@P-733-Lin:~> From /etc/my.cnf: # The following options will be passed to all MySQL clients [client] #password = your_password port = 3306 socket = /var/lib/mysql/mysql.sock #socket = /varacer laptop hard drive replace howto/mysql/mysql.sock # Here follows entries for some specific programs # The MySQL server [mysqld] port = 3306 socket = /var/lib/mysql/mysql.sock # Change following line if you want to store your database elsewhere datadir = /var/lib/mysql skip-locking From /etc/init.d/mysql: # The following section has been taken from # the original MySQL init script # Note: If you want to change these variables, you'll make your life easier # if you do so in /etc/my.cnf, which is preserved during upgrades basedir=/usr datadir=/var/lib/mysql mysql_daemon_user=mysql mysql_daemon_group=mysql pid_file=/var/lib/mysql/mysqld.pid socket=/var/lib/mysql/mysql.sock print_defaults=/usr/bin/my_print_defaults Any idea as to how to best troubleshoot and correct this? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 17 May 2009 23:22:08 Mike McMullin wrote:
-rw-r--r-- 1 root root 0 2009-05-16 16:41 mysqld.pid
The pid file is 0 bytes large. Are you sure mysql is running at all? Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, 2009-05-17 at 23:29 +0200, Anders Johansson wrote:
On Sunday 17 May 2009 23:22:08 Mike McMullin wrote:
-rw-r--r-- 1 root root 0 2009-05-16 16:41 mysqld.pid
The pid file is 0 bytes large. Are you sure mysql is running at all?
Yast->System->System Services indicates Yes* (with the astersisk), CLI result as root: rcmysql status Checking for service MySQL: checkproc: Empty pid file /var/lib/mysql/mysqld.pid for /usr/sbin/mysqld unused -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 17 May 2009 23:34:08 Mike McMullin wrote:
On Sun, 2009-05-17 at 23:29 +0200, Anders Johansson wrote:
On Sunday 17 May 2009 23:22:08 Mike McMullin wrote:
-rw-r--r-- 1 root root 0 2009-05-16 16:41 mysqld.pid
The pid file is 0 bytes large. Are you sure mysql is running at all?
Yast->System->System Services indicates Yes* (with the astersisk),
CLI result as root:
rcmysql status Checking for service MySQL: checkproc: Empty pid file /var/lib/mysql/mysqld.pid for /usr/sbin/mysqld
unused
Exactly, but the best way would be ps aux|grep mysql If it isn't, try starting it by hand rcmysql start and see if you get any error messages. You probably also want to check log files Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, 2009-05-17 at 23:37 +0200, Anders Johansson wrote:
On Sunday 17 May 2009 23:34:08 Mike McMullin wrote:
On Sun, 2009-05-17 at 23:29 +0200, Anders Johansson wrote:
On Sunday 17 May 2009 23:22:08 Mike McMullin wrote:
-rw-r--r-- 1 root root 0 2009-05-16 16:41 mysqld.pid
The pid file is 0 bytes large. Are you sure mysql is running at all?
Yast->System->System Services indicates Yes* (with the astersisk),
CLI result as root:
rcmysql status Checking for service MySQL: checkproc: Empty pid file /var/lib/mysql/mysqld.pid for /usr/sbin/mysqld
unused
Exactly, but the best way would be
ps aux|grep mysql
ps aux|grep mysql root 14781 0.0 0.0 3232 748 pts/5 S+ 17:56 0:00 grep mysql
If it isn't, try starting it by hand
rcmysql start
and see if you get any error messages. You probably also want to check log files
rcmysql start checkproc: Empty pid file /var/lib/mysql/mysqld.pid for /usr/sbin/mysqld Updating MySQL privilege database... failed From /var/log/mysqld.log: 090517 17:57:40 mysqld started 090517 17:57:41 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog_format=mixed' 090517 17:57:41 mysqld ended -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 18 May 2009 00:02:18 Mike McMullin wrote:
090517 17:57:40 mysqld started 090517 17:57:41 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog_format=mixed' 090517 17:57:41 mysqld ended
Am I right in thinking that you have been playing with newer versions of mysql on this system? This looks like you're trying to start mysqld with a configuration file for a much newer version of mysql. The binlog_format variable wasn't added until version 5.1.5 according to the mysql docs Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2009-05-18 at 00:20 +0200, Anders Johansson wrote:
On Monday 18 May 2009 00:02:18 Mike McMullin wrote:
090517 17:57:40 mysqld started 090517 17:57:41 [ERROR] /usr/sbin/mysqld: unknown variable 'binlog_format=mixed' 090517 17:57:41 mysqld ended
Am I right in thinking that you have been playing with newer versions of mysql on this system?
Yes, then I switched back.
This looks like you're trying to start mysqld with a configuration file for a much newer version of mysql. The binlog_format variable wasn't added until version 5.1.5 according to the mysql docs
So the uninstall and downgrade to the original install version didn't work. I looked at the various my.cnf* files in /etc and all but the my.cnf.rpmnew had a reference to binlog format=mixed. After mv the my.cnf for back, i did a cp my.cnf.rpmnew my.cnf and this was the result: rcmysql start checkproc: Empty pid file /var/lib/mysql/mysqld.pid for /usr/sbin/mysqld Updating MySQL privilege database... Looking for 'mysql' in: /usr/bin/mysql Looking for 'mysqlcheck' in: /usr/bin/mysqlcheck Running 'mysqlcheck'... mysql.columns_priv OK mysql.db OK mysql.event OK mysql.func OK mysql.general_log Error : Can't find file: 'general_log' (errno: 2) error : Corrupt mysql.help_category OK mysql.help_keyword OK mysql.help_relation OK mysql.help_topic OK mysql.host OK mysql.ndb_binlog_index OK mysql.plugin OK mysql.proc OK mysql.procs_priv OK mysql.servers OK mysql.slow_log Error : Can't find file: 'slow_log' (errno: 2) error : Corrupt mysql.tables_priv OK mysql.time_zone OK mysql.time_zone_leap_second OK mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK Repairing tables mysql.general_log Error : Can't find file: 'general_log' (errno: 2) error : Corrupt mysql.slow_log Error : Can't find file: 'slow_log' (errno: 2) error : Corrupt Running 'mysql_fix_privilege_tables'... OK Starting service MySQL done and this: ps aux|grep mysql root 17164 0.0 0.0 2936 1308 pts/0 S 21:24 0:00 /bin/sh /usr/bin/mysqld_safe --mysqld=mysqld --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --socket=/var/lib/mysql/mysql.sock --datadir=/var/lib/mysql mysql 17209 0.2 1.1 111956 17244 pts/0 Sl 21:24 0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/mysqld.pid --skip-external-locking --port=3306 --socket=/var/lib/mysql/mysql.sock root 17447 0.0 0.0 3232 740 pts/0 S+ 21:38 0:00 grep mysql I'll need to reconfigure mythtv, but I'm sure the practice on that will do me some good, as I am not familiar enough with the program. Thanks, Mike -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 17 May 2009 23:34:08 Mike McMullin wrote:
Yast->System->System Services indicates Yes* (with the astersisk),
By the way, "Yes*" means "enabled but not currently running" (as per the help text on that screen in YaST) Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, 2009-05-17 at 23:39 +0200, Anders Johansson wrote:
On Sunday 17 May 2009 23:34:08 Mike McMullin wrote:
Yast->System->System Services indicates Yes* (with the astersisk),
By the way, "Yes*" means "enabled but not currently running" (as per the help text on that screen in YaST)
Thanks, I couldn't remember what it meant. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
Anders Johansson
-
Mike McMullin