Buy Sell Discuss UK Domain Names at AcornDomains.co.uk Domain Sponsor

Today's Drop Dates are: 07-11-2011 or 14-11-2011   All times are GMT. The time now is 09:10:10 PM.
Domain Name Sales Domain Software Calculate UK Domain Drop Dates Domain Registration NameDrive Domain Parking Subscribe to our Domains For Sale newsletter
Go Back   Domain Forum Acorn Domains Buy Sell Auction UK Domains > Website Design and Promotion > Website Design > Scripts and Coding
Connect with Facebook

Scripts and Coding PHP, MySQL, scripts

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 27-06-2008, 12:41:40 AM     #1 (permalink)

 
Join Date: Jan 2005
Posts: 160
mishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond repute

MySql problems

Following a Red Hat Linux server restart (which may well have enacted some updates) I am unable to start/restart mysql:

Quote:
/etc/init.d/mysql restart
MySQL PID file could not be found! [FAILED]
Starting MySQL................................... [FAILED]
Simply typing "mysql" gives me
Quote:
mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
I've looked through various forums etc. and can't find an answer, I've edited /etc/my.cnf
to point to both mysql.sock files I can find on the machine, neither helps.

Any ideas?
mishmash is offline  
Old 27-06-2008, 06:14:23 AM     #2 (permalink)

 
Join Date: May 2006
Posts: 1,192
Jeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond reputeJeewhizz has a reputation beyond repute

What does the mysql error file say? It'll be somewhere like /var/lib/mysql/{hostname}.err

Where {hostname} is the hostname of the machine.
Jeewhizz is offline  
Old 27-06-2008, 10:14:47 AM     #3 (permalink)

 
tifosi's Avatar
 
Join Date: Oct 2004
Location: Lancashire
Posts: 1,792
tifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond reputetifosi has a reputation beyond repute

looks like the mysql process that the pid - process ID file holds has died. In the past I've emptied - not removed that file. On rare ocassions I've had to create it as well.

Start and stop mysql to see if it's ok. It may have left tables in a crashed (unclosed correctly) state which need repairing - either through mysqlcheck or myisamchk (with mysql off).

If you use phpMyAdmin then that will have repair options.

I prefer myisamchk (if the db used myisam - default) but you need root/mysql permissions to run that.

S
tifosi is offline  
Old 27-06-2008, 12:56:30 PM     #4 (permalink)

 
Join Date: Jan 2005
Posts: 160
mishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond repute

Thank you for the suggestions - the below is the results from trying them:
Quote:
Originally Posted by Jeewhizz View Post
What does the mysql error file say?.
Quote:
Number of processes running now: 0
060902 12:20:31 mysqld restarted
060902 12:20:32 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
060902 12:20:32 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 1237811.
InnoDB: Doing recovery: scanned up to log sequence number 0 1237811
060902 12:20:32 InnoDB: Flushing modified pages from the buffer pool...
060902 12:20:32 InnoDB: Started; log sequence number 0 1237811
/usr/sbin/mysqld: ready for connections.
Version: '4.1.21-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 My$
A restart mysql attempt results in
Quote:
/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "mysql has failed").
It could be a firewall problem?

I've run the following commands
service iptables stop
iptables --flush
mishmash is offline  
Old 27-06-2008, 01:02:32 PM     #5 (permalink)

 
Join Date: Sep 2004
Location: London, UK
Posts: 175
Craig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud of

Is this a cPanel machine? Do you have a "basedir=" entry in your /etc/my.cnf?
__________________
Craig Robinson - UKDedicated LTD
UK Dedicated Servers || UK cPanel Hosting || UK Reseller Hosting
Craig is offline  
Old 27-06-2008, 01:21:48 PM     #6 (permalink)

 
Join Date: Jan 2005
Posts: 160
mishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond repute

Quote:
Originally Posted by Craig View Post
Is this a cPanel machine? Do you have a "basedir=" entry in your /etc/my.cnf?
Yes, this is WHM/cPanel on Red Hat Linux

I do not have a basedir entry in /etc/my.cnf
There is no basedir either in /usr/local/cpanel/whostmgr/my.cnf
mishmash is offline  
Old 27-06-2008, 01:28:45 PM     #7 (permalink)

 
Join Date: Sep 2004
Location: London, UK
Posts: 175
Craig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud ofCraig has much to be proud of

Ok.. Do you have a symlink in /tmp/ still for mysql.sock?
__________________
Craig Robinson - UKDedicated LTD
UK Dedicated Servers || UK cPanel Hosting || UK Reseller Hosting
Craig is offline  
Old 27-06-2008, 01:31:52 PM     #8 (permalink)

 
Join Date: Jan 2005
Posts: 160
mishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond repute

Quote:
Originally Posted by Craig View Post
Ok.. Do you have a symlink in /tmp/ still for mysql.sock?
In /tmp/

I have
mysql.sock@


In response to "locate mysql.sock" (recently having run updatedb) I have:
/var/lib/mysql/mysql.sock
/usr/local/lib/mysql.sock
mishmash is offline  
Old 27-06-2008, 01:39:32 PM     #9 (permalink)

 
Join Date: Jan 2005
Posts: 160
mishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond reputemishmash has a reputation beyond repute

The result of running the command "ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock"
Was ln: `/tmp/mysql.sock': File exists

A restart attempt of mysql resulted in the same error as before.

This error was the same following the running of the command: "ln -s -f /var/lib/mysql/mysql.sock /tmp/mysql.sock
mishmash is offline  
Old 27-06-2008, 01:50:51 PM     #10 (permalink)

 
yesterday's Avatar
 
Join Date: Jul 2006
Posts: 607
yesterday has a reputation beyond reputeyesterday has a reputation beyond reputeyesterday has a reputation beyond reputeyesterday has a reputation beyond reputeyesterday has a reputation beyond reputeyesterday has a reputation beyond reputeyesterday has a reputation beyond reputeyesterday has a reputation beyond reputeyesterday has a reputation beyond reputeyesterday has a reputation beyond reputeyesterday has a reputation beyond repute

are you starting mysql as the right user?

yesterday
yesterday is offline  
Closed Thread



Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Domain Name Community Replies Last Post
Servage MySQL problems etc.... mat Domain Name Registrars 8 07-10-2008 01:55:41 PM
1 mysql - 2 sites... ratboy Website Design 4 15-02-2008 01:17:46 PM
MySQL help fish Services Wanted 9 10-09-2007 10:59:49 AM
123-reg problems goldman General Board 2 07-05-2006 07:18:25 PM


All times are GMT. The time now is 09:10:10 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 RC 2
All content on Acorn Domains is member generated and is not moderated before posting. All content is viewed and used by you at your own risk and AD does not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributors and not necessarily those of AD. Please contact us to report any issues or send a PM to "Admin".