Fedora Linux Support Community & Resources Center
  #1  
Old 15th April 2006, 10:04 PM
Boodlooder Offline
Registered User
 
Join Date: Jul 2005
Posts: 23
Exclamation MySQL problems

I'm not able to launch mysql, or the mysql administrator gui component.

The error seems to be related to a missing mysql.sock file.

Here is the error (same in command line, and gui)

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

When I run 'locate mysql.sock' as root, I get nothing. I'm not sure what could be wrong, I have a fresh-clean install of php, mysql, php-mysql and PHP is working great, but I'm sitting at the install screen waiting to continue, needing to first make user changes to mysql before I continue. Dropped to the console, and the 'mysql.sock' issue stopped me dead in my tracks.

I understand what it is looking for, but I am at a loss to explain why the file would not be there, or what to do to substitute this file.. (the gui version allows you to specify a socks file).

Any help would be greatly appreciated.
Reply With Quote
  #2  
Old 15th April 2006, 10:09 PM
Boodlooder Offline
Registered User
 
Join Date: Jul 2005
Posts: 23
Angry OMG Nevermind

cd /etc/rc.d/init.d
./mysqld start

(might help)

Reply With Quote
  #3  
Old 22nd April 2006, 04:13 PM
zence Offline
Registered User
 
Join Date: Apr 2006
Posts: 2
I get the same error :

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

but when I try cd /etc/rc.d/init.d/mysql start I get: -bash: cd/etc/rc.d/init.d./mysqld: The file or the catalog doesn't exist. The installation went fine.
Reply With Quote
  #4  
Old 22nd April 2006, 04:15 PM
Sarthan Offline
Registered User
 
Join Date: Feb 2006
Location: Belgium
Age: 36
Posts: 142
# rpm -qa | grep mysql

and verify if these packages are listed :

mysql-5.0.18-2.1
mysql-server-5.0.18-2.1
Reply With Quote
  #5  
Old 22nd April 2006, 05:28 PM
landoncz Offline
Registered User
 
Join Date: Dec 2005
Location: Florida, USA
Age: 35
Posts: 338
Code:
cd /etc/init.d/rc.d/mysql start
will give an error beacuse that is an attempt to cd to a file, which is not allowed.

You should instead be typing as two separate commands (or place a semicolon between them) as root:
Code:
cd /etc/init.d
./mysqld start
or just type this one command:
Code:
/etc/init.d/mysqld start
and see what the output says...
__________________
Fedora Core 6 on Asus Z63A 14" Laptop
2.0 Ghz Pentium M
1 Gig RAM
100 Gig 7200 RPM

Code:
# rm -rf /dev/brain
Reply With Quote
  #6  
Old 22nd April 2006, 08:54 PM
icydog Offline
Registered User
 
Join Date: Nov 2005
Posts: 451
Or use
Code:
service mysqld start
=)
Reply With Quote
  #7  
Old 22nd April 2006, 09:02 PM
Boodlooder Offline
Registered User
 
Join Date: Jul 2005
Posts: 23
Arrow

Actually, the best way to go about this (for my purposes anyhow) is to add..

Code:
# Start httpd  for Apache
666:345:respawn:/etc/rc.d/init.d/httpd start

# Start vsftpd  For VSFTP
667:345:respawn:/etc/rc.d/init.d/vsftpd start

# Start mysqld  For MySQL
668:345:respawn:/etc/rc.d/init.d/mysqld start
to your inittab under /etc. (I thought it was in there by default. Unfortunately this is the second box I've set up and it's been so long since I set the other one up I forgot I did this..

You may not want respawn, look at your options to decide which way is best. Respawn causes the service to restart if it farts on you.
Reply With Quote
  #8  
Old 23rd April 2006, 12:38 AM
zence Offline
Registered User
 
Join Date: Apr 2006
Posts: 2
Thank you all for your answers and thank's Boodlooder ......it solved the problem.
Reply With Quote
  #9  
Old 23rd April 2006, 12:59 AM
pinkydaemon Offline
Registered User
 
Join Date: Apr 2006
Posts: 2
Exclamation

I have the same problem as zence
(ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
)
but when i enter /etc/rc.d/init.d/mysqld start
i get a
¨Initializing MySQL database: Neither host 'bhai.b-hive' nor 'localhost' could be looked up with
/usr/bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
[FAILED]¨
i tried /etc/rc.d/init.d/mysqld start --force. I get the same error.
bhai is my local hostname and b-hive domain.
I ran hostname command which give me ¨bhai.b-hive¨

Last edited by pinkydaemon; 23rd April 2006 at 01:00 AM. Reason: forgot something
Reply With Quote
  #10  
Old 23rd April 2006, 11:26 PM
Boodlooder Offline
Registered User
 
Join Date: Jul 2005
Posts: 23
check your /etc/hosts file.

Also, try to ping the two domains. Your domain, if properly configured should return your ip address. pinging the localhost should return 127.0.0.1 (loopback).

If neither of these work, again, check your hosts file. (and possibly your dns settings, especially if you are trying to host your own dns server).

Reply With Quote
  #11  
Old 26th April 2006, 02:06 AM
pinkydaemon Offline
Registered User
 
Join Date: Apr 2006
Posts: 2
i checked my /etc/hosts file. I contained just 2 commented lines. I actually dont know what it is supposed to contain. can u tell me what i shud enter into it.

pinging localhost didnt return anything. i have started httpd
Reply With Quote
  #12  
Old 26th April 2006, 02:46 AM
Boodlooder Offline
Registered User
 
Join Date: Jul 2005
Posts: 23
thats bad

post your /etc/hosts file -


Something's not right.
Reply With Quote
  #13  
Old 26th April 2006, 02:53 AM
triax Offline
Registered User
 
Join Date: Jan 2005
Posts: 8
you should have at least the following in your hosts file
127.0.0.1 your_hostname localhost localhost.localdomain
__________________
Earn Cash at TreasureTrooper
Reply With Quote
Reply

Tags
mysql, problems

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql problems cranium Using Fedora 3 2nd February 2008 03:14 PM
PHP/MYSQL problems after FC3->FC4 overlord Servers & Networking 6 14th October 2005 06:38 AM
mysql problems wolfey38 Servers & Networking 6 18th June 2005 11:34 PM


Current GMT-time: 04:14 (Monday, 28-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat