mysql.sock missing in action.
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Re: mysql.sock missing in action.
Ok, this is driving me bonkers...
where should host.frm reside? var/lib/mysql or var/lib/mysql/mysql?
I've triple checked the permissions on files and dirs, I've used both the my.cnf.rpmnew and the one posted by Kalimari.
I just can't imagine what broke when I did the upgrade to 5.1.48.
So, I'm thinking my options are as follows, 1) remove mysql and reinstall or 2) force upgrade of mysql. Would there be a 3'rd option?
And the permissions issue on host.frm is annoying.
any other log files to look at besides mysqld.log that might have a clue as to what is going on?
where should host.frm reside? var/lib/mysql or var/lib/mysql/mysql?
I've triple checked the permissions on files and dirs, I've used both the my.cnf.rpmnew and the one posted by Kalimari.
I just can't imagine what broke when I did the upgrade to 5.1.48.
So, I'm thinking my options are as follows, 1) remove mysql and reinstall or 2) force upgrade of mysql. Would there be a 3'rd option?
And the permissions issue on host.frm is annoying.
any other log files to look at besides mysqld.log that might have a clue as to what is going on?
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Re: mysql.sock missing in action.
Here is the tail of my yum log.
Jun 19 01:31:22 Updated: glibc-common-2.5-49.el5_5.2.i386
Jun 19 01:31:45 Updated: glibc-2.5-49.el5_5.2.i686
Jun 19 01:32:12 Updated: 4:perl-5.8.8-32.el5_5.1.i386
Jun 19 01:32:14 Installed: mysqlclient15-5.0.90-1.el5.art.i386
Jun 19 01:32:17 Updated: mysql-libs-5.1.48-1.el5.art.i386
Jun 19 01:32:20 Updated: mysql-5.1.48-1.el5.art.i386
Jun 19 01:32:25 Updated: mysql-server-5.1.48-1.el5.art.i386
Jun 19 01:32:25 Updated: 4:perl-suidperl-5.8.8-32.el5_5.1.i386
Jun 19 01:32:26 Updated: sudo-1.7.2p1-7.el5_5.i386
Jun 19 01:32:26 Updated: strace-4.5.18-5.el5_5.5.i386
Jun 19 01:32:27 Updated: nscd-2.5-49.el5_5.2.i386
Jun 19 01:32:32 Updated: glibc-headers-2.5-49.el5_5.2.i386
Jun 19 01:32:34 Updated: glibc-devel-2.5-49.el5_5.2.i386
Jun 21 19:47:14 Updated: 1:cups-libs-1.3.7-18.el5_5.4.i386
Jun 21 19:47:16 Updated: openais-0.80.6-16.el5_5.2.i386
Jun 21 19:47:17 Updated: libsmbclient-3.0.33-3.29.el5_5.i386
Jun 21 19:47:23 Updated: samba-common-3.0.33-3.29.el5_5.i386
Jun 21 19:47:48 Updated: 1:cups-1.3.7-18.el5_5.4.i386
Jun 21 19:48:00 Updated: samba-3.0.33-3.29.el5_5.i386
Jun 19 01:31:22 Updated: glibc-common-2.5-49.el5_5.2.i386
Jun 19 01:31:45 Updated: glibc-2.5-49.el5_5.2.i686
Jun 19 01:32:12 Updated: 4:perl-5.8.8-32.el5_5.1.i386
Jun 19 01:32:14 Installed: mysqlclient15-5.0.90-1.el5.art.i386
Jun 19 01:32:17 Updated: mysql-libs-5.1.48-1.el5.art.i386
Jun 19 01:32:20 Updated: mysql-5.1.48-1.el5.art.i386
Jun 19 01:32:25 Updated: mysql-server-5.1.48-1.el5.art.i386
Jun 19 01:32:25 Updated: 4:perl-suidperl-5.8.8-32.el5_5.1.i386
Jun 19 01:32:26 Updated: sudo-1.7.2p1-7.el5_5.i386
Jun 19 01:32:26 Updated: strace-4.5.18-5.el5_5.5.i386
Jun 19 01:32:27 Updated: nscd-2.5-49.el5_5.2.i386
Jun 19 01:32:32 Updated: glibc-headers-2.5-49.el5_5.2.i386
Jun 19 01:32:34 Updated: glibc-devel-2.5-49.el5_5.2.i386
Jun 21 19:47:14 Updated: 1:cups-libs-1.3.7-18.el5_5.4.i386
Jun 21 19:47:16 Updated: openais-0.80.6-16.el5_5.2.i386
Jun 21 19:47:17 Updated: libsmbclient-3.0.33-3.29.el5_5.i386
Jun 21 19:47:23 Updated: samba-common-3.0.33-3.29.el5_5.i386
Jun 21 19:47:48 Updated: 1:cups-1.3.7-18.el5_5.4.i386
Jun 21 19:48:00 Updated: samba-3.0.33-3.29.el5_5.i386
Re: mysql.sock missing in action.
On RHEL5 host.frm is in /var/lib/mysql/mysql/Galactic Zero wrote:where should host.frm reside? var/lib/mysql or var/lib/mysql/mysql?
Do you have /var/lib/mysql/mysql/host.frm?
errno: 13 definitely means it's permissions.
Are all files in /var/lib/mysql/mysql/ owned by mysql:mysql & permissions 660?
Re-installing MySQL will probably have quite a few dependency issues and might not be viable?
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Re: mysql.sock missing in action.
Aye, it lives in /var/lib/mysql/mysql and is owned by mysql and has permissions of 0660 as are the rest of the files in that dir....
This is what is so puzzling about this... Everything looks right just won't work. If I had any hair, I'd be pulling it out right about now.
This is what is so puzzling about this... Everything looks right just won't work. If I had any hair, I'd be pulling it out right about now.
Re: mysql.sock missing in action.
Grrr! Nothing seems to work, maybe its time to consider re-installing mysql? Not sure of the best approach though, as I've never needed to do it.
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Re: mysql.sock missing in action.
I've posted over at mysql.com to see if they might have an answer, if you're interested in what they might have to say here is the link to the thread: http://forums.mysql.com/read.php?11,373 ... msg-373216
Hopefully someone comes up with an answer other than remove and reinstall.
Hopefully someone comes up with an answer other than remove and reinstall.
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Re: mysql.sock missing in action.
Scott or anyone, any gotcha's on removing mysql and reinstalling? would yum erase work? I'd probably need to force the removal but forgot which switch does that. This is very frustrating as I can't use any mysql program, even the plesk cp.
argh!!!
argh!!!
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Re: mysql.sock missing in action.
Ok, someone over at the mysql forums said to change the datadir from /var/lib/mysql to /var/lib/mysql/mysql and in doing so, I was able to start mysqld however... None of my databases are getting picked up now.
Gonna try an experiment... or maybe not...
Gonna try an experiment... or maybe not...
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Re: mysql.sock missing in action. (solved.)
Solution was simple...
Since the yum upgrade mysql put all the new mysql files into /var/lib/mysql/mysql I just had to copy all the files in that dir up one level so they all live in /var/lib/mysql.
Once that was done databases started working again and I can get into plesk.
Good thing this server didn't have very many active mysql db's on it other than one forum and the CP.
Since the yum upgrade mysql put all the new mysql files into /var/lib/mysql/mysql I just had to copy all the files in that dir up one level so they all live in /var/lib/mysql.
Once that was done databases started working again and I can get into plesk.
Good thing this server didn't have very many active mysql db's on it other than one forum and the CP.
Re: mysql.sock missing in action.
Excellent news! Thanks for posting the solution...
Re: mysql.sock missing in action.
I have a similar problem which I seem to have solved by re-instating an old my.cnf
(i.e. Plesk failed connect mysql, command line reboot then saw apache go down)
I am not using the rpmnew file.
I believe that my existing my.cnf is defaulting to mysql_safe and that is the only reason that everythging is momentarily working.
I would like to use my sql tweaks but I can see a few problems.
Here are the errors whilst mysql was attempting to restart itself every minute:
100628 12:30:02 [ERROR] Aborting
100628 12:30:02 [ERROR] /usr/libexec/mysqld: unknown option '--skip-bdb'
100628 12:30:02 InnoDB: Started; log sequence number 0 3455301925
100628 12:30:01 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
100628 12:30:01 [Note] Plugin 'ndbcluster' is disabled.
100628 12:30:01 [Warning] '--log_slow_queries' is deprecated and will be removed in a future release. Please use ''--slow_query_log'/'--slow_query_log_file'' instead.
100628 12:30:01 [Warning] /usr/libexec/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
100628 12:30:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100628 12:29:28 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
100628 12:29:28 [Note] /usr/libexec/mysqld: Shutdown complete
100628 12:29:28 InnoDB: Shutdown completed; log sequence number 0 3455301925
100628 12:29:23 InnoDB: Starting shutdown...
Then, after changing to an old my.cnf...
100628 18:20:40 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:40 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:39 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:28 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:27 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:26 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:26 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 13:05:39 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 13:05:38 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 13:05:36 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 13:05:28 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 12:46:18 mysqld_safe A mysqld process already exists
Version: '5.1.48' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
100628 12:46:07 [Note] /usr/libexec/mysqld: ready for connections.
100628 12:46:07 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
100628 12:46:07 [ERROR] Cannot open mysql.event
100628 12:46:07 [ERROR] mysql.user has no `Event_priv` column at position 29
100628 12:46:07 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50088, now running 50148. Please use mysql_upgrade to fix this error.
100628 12:46:07 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
100628 12:46:07 InnoDB: Started; log sequence number 0 3455301925
100628 12:46:07 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
100628 12:46:07 [Note] Plugin 'ndbcluster' is disabled.
100628 12:46:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100628 12:45:07 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
100628 12:45:07 [Note] /usr/libexec/mysqld: Shutdown complete
100628 12:45:07 InnoDB: Shutdown completed; log sequence number 0 3455301925
100628 12:45:02 InnoDB: Starting shutdown...
But I can see no real difference between the my.cnf files?????
Was this just a fluke?
But I operate a large number of databases on the server (so I am very concerned about my next step)
Do I use the my.cnf.rpmnew file as a base and then add my tweaks?
(excluding the above bdb & slow query, etc.)
I also have the dierctory /var/lib/mysql/mysql
Having had the server down for 2 hours whilst I fluked the above restart, somehow - I need help!
(i.e. Plesk failed connect mysql, command line reboot then saw apache go down)
I am not using the rpmnew file.
I believe that my existing my.cnf is defaulting to mysql_safe and that is the only reason that everythging is momentarily working.
I would like to use my sql tweaks but I can see a few problems.
Here are the errors whilst mysql was attempting to restart itself every minute:
100628 12:30:02 [ERROR] Aborting
100628 12:30:02 [ERROR] /usr/libexec/mysqld: unknown option '--skip-bdb'
100628 12:30:02 InnoDB: Started; log sequence number 0 3455301925
100628 12:30:01 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
100628 12:30:01 [Note] Plugin 'ndbcluster' is disabled.
100628 12:30:01 [Warning] '--log_slow_queries' is deprecated and will be removed in a future release. Please use ''--slow_query_log'/'--slow_query_log_file'' instead.
100628 12:30:01 [Warning] /usr/libexec/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
100628 12:30:01 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100628 12:29:28 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
100628 12:29:28 [Note] /usr/libexec/mysqld: Shutdown complete
100628 12:29:28 InnoDB: Shutdown completed; log sequence number 0 3455301925
100628 12:29:23 InnoDB: Starting shutdown...
Then, after changing to an old my.cnf...
100628 18:20:40 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:40 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:39 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:28 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:27 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:26 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 18:20:26 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 13:05:39 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 13:05:38 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 13:05:36 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 13:05:28 [ERROR] Invalid (old?) table or database name 'tropical-living-net'
100628 12:46:18 mysqld_safe A mysqld process already exists
Version: '5.1.48' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
100628 12:46:07 [Note] /usr/libexec/mysqld: ready for connections.
100628 12:46:07 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
100628 12:46:07 [ERROR] Cannot open mysql.event
100628 12:46:07 [ERROR] mysql.user has no `Event_priv` column at position 29
100628 12:46:07 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50088, now running 50148. Please use mysql_upgrade to fix this error.
100628 12:46:07 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
100628 12:46:07 InnoDB: Started; log sequence number 0 3455301925
100628 12:46:07 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
100628 12:46:07 [Note] Plugin 'ndbcluster' is disabled.
100628 12:46:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
100628 12:45:07 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
100628 12:45:07 [Note] /usr/libexec/mysqld: Shutdown complete
100628 12:45:07 InnoDB: Shutdown completed; log sequence number 0 3455301925
100628 12:45:02 InnoDB: Starting shutdown...
But I can see no real difference between the my.cnf files?????
Was this just a fluke?
But I operate a large number of databases on the server (so I am very concerned about my next step)
Do I use the my.cnf.rpmnew file as a base and then add my tweaks?
(excluding the above bdb & slow query, etc.)
I also have the dierctory /var/lib/mysql/mysql
Having had the server down for 2 hours whilst I fluked the above restart, somehow - I need help!
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
If a thing is not worth doing, it's not worth doing well.
Re: mysql.sock missing in action.
Hi,
The --skip-bdb error is due to Berkeley DB no longer being part of the default MySQL distribution, so comment it out (using ; at start of line) or delete reference.
mysql.plugin is a feature of MySQL 5.1.x
Have you run: mysql_upgrade -u admin -p (enter Plesk pw at prompt), this will do the necessary work to update your 5.0.x tables/settings to 5.1.x compatibility.
The other [WARNING]s mean you need to adjust the names of the slow query log my.cnf variables (Search the MySQL forum for the options to suit your set-up). e.g:
slow_query_log_file = /var/log/mysqld.slow.log
slow_query_log = 1
I think running mysql_upgrade would sort out the invalid table problems and other settings/privileges.
The --skip-bdb error is due to Berkeley DB no longer being part of the default MySQL distribution, so comment it out (using ; at start of line) or delete reference.
mysql.plugin is a feature of MySQL 5.1.x
Have you run: mysql_upgrade -u admin -p (enter Plesk pw at prompt), this will do the necessary work to update your 5.0.x tables/settings to 5.1.x compatibility.
The other [WARNING]s mean you need to adjust the names of the slow query log my.cnf variables (Search the MySQL forum for the options to suit your set-up). e.g:
slow_query_log_file = /var/log/mysqld.slow.log
slow_query_log = 1
I think running mysql_upgrade would sort out the invalid table problems and other settings/privileges.
-
- Forum Regular
- Posts: 471
- Joined: Mon Dec 06, 2004 10:43 pm
Re: mysql.sock missing in action.
I had several problems running the mysql_upgrade with corrupt tables etc, You'll see which ones will give you fits, you MUST fix those first to proceed with the upgrade of the tables. Once I did that all was well.
The tables that took a very long time to fix / repair were my sa_bayes tables. I had alot of problems there and the records for a couple of the tables are very large.
In shell type mysqlcheck --user=admin --all-databases --auto-repair -p and at prompt type in your Plesk CP password. and to optimize them type: mysqlcheck --all-databases --optimize --user=admin -p
Hope this helps.
The tables that took a very long time to fix / repair were my sa_bayes tables. I had alot of problems there and the records for a couple of the tables are very large.
In shell type mysqlcheck --user=admin --all-databases --auto-repair -p and at prompt type in your Plesk CP password. and to optimize them type: mysqlcheck --all-databases --optimize --user=admin -p
Hope this helps.
-
- Atomicorp Staff - Site Admin
- Posts: 8355
- Joined: Wed Dec 31, 1969 8:00 pm
- Location: earth
- Contact:
Re: mysql.sock missing in action.
FYI there is now a wiki page for this:
http://www.atomicorp.com/wiki/index.php/Mysql
great place to capture any of the troubleshooting steps.
http://www.atomicorp.com/wiki/index.php/Mysql
great place to capture any of the troubleshooting steps.
Re: mysql.sock missing in action.
I will be attacking this issue as soon as I have a moment spare...
Given that my issues are similar but not exactly the same as Galactic Zero's original post;
and that my system appears to be running via a default to mysqld_safe;
are there any recommendations regarding these 2 points?
1. Move or copy all files from the directory /var/lib/mysql/mysql to the directory /var/lib/mysql/
2. Use the use the my.cnf.rpmnew file as a base and then add my tweaks
(or use the "suck it and see" approach to computing which has serviced me adequately for 20 years?)
Anyone prepared to professionally suggest anything regarding the 2 above points?
Given that my issues are similar but not exactly the same as Galactic Zero's original post;
and that my system appears to be running via a default to mysqld_safe;
are there any recommendations regarding these 2 points?
1. Move or copy all files from the directory /var/lib/mysql/mysql to the directory /var/lib/mysql/
2. Use the use the my.cnf.rpmnew file as a base and then add my tweaks
(or use the "suck it and see" approach to computing which has serviced me adequately for 20 years?)
Anyone prepared to professionally suggest anything regarding the 2 above points?
They say that good intentions, pave the road to hell;
If a thing is not worth doing, it's not worth doing well.
If a thing is not worth doing, it's not worth doing well.