LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-27-2001, 08:29 PM   #1
jwill
LQ Newbie
 
Registered: May 2001
Posts: 7

Rep: Reputation: 0
Unhappy


I'm using the default installation of MySQL under Linux 7. Unfortunately I get this error when I try to make "any" type of connection to MySQL.

error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)'

Can any one help?
 
Old 05-27-2001, 08:44 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
At the risk of insulting your intelligence is mysqld running? If it is running your software might be looking for mysql.sock in the wrong place, run
Code:
find / -name mysql.sock
in an attempt to located it, mine is in /tmp which is the default location when doing a source install, dunno about Redhat's (I'm assuming you mean Redhat 7 by 'Linux 7' ) RPMs. If you do find it somewhere else then have a go at using
Code:
mysql -S /some/path/mysql.sock -u root -p mysql
to initiate the connection as user root, and using the 'mysql' database, this will prompt you for a password if you have one set. You can set this using /etc/my.cnf if you don't want to type it in every time. Check out the mysql manual for file details.

HTH

Jamie...
 
Old 05-28-2001, 11:50 AM   #3
tyler_durden
Member
 
Registered: May 2001
Posts: 125

Rep: Reputation: 15
there is a bug in the original release that wont allow you to connect check out http://www.redhat.com/support/errata/RHBA-2000-067.html to get the updated version
 
Old 05-29-2001, 11:17 AM   #4
jwill
LQ Newbie
 
Registered: May 2001
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks, I'll try that out. I am not insulted at all, I am a complete novice when it comes to Linux.
 
Old 05-29-2001, 05:01 PM   #5
jwill
LQ Newbie
 
Registered: May 2001
Posts: 7

Original Poster
Rep: Reputation: 0
I ran the command suggested and it gave me this output:
/var/lib/mysql/mysql.sock
find: /proc/6/fd: Permission denied

I am logged on as root.
 
Old 05-29-2001, 06:50 PM   #6
nabil
Member
 
Registered: Feb 2001
Location: MI, USA
Distribution: Debian Linux 100% GNU
Posts: 210

Rep: Reputation: 31
chmod 777 /var/lib/mysql/mysql.sock

you should be all set.
 
Old 05-29-2001, 07:20 PM   #7
jwill
LQ Newbie
 
Registered: May 2001
Posts: 7

Original Poster
Rep: Reputation: 0
sorry guys but, it keeps giving me the same error, is there something else I may be doing wrong?
 
Old 05-29-2001, 07:24 PM   #8
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
The error it gives you is when you run 'find' yeah? What happens when you use the mysql command to connect to it, as mentioned ealier? The 'find' might be trying to stat the file, which is really connected to a process, which is knocking you back in the same way it would with any unauthenticated access...

Jamie...
 
Old 05-29-2001, 08:38 PM   #9
jwill
LQ Newbie
 
Registered: May 2001
Posts: 7

Original Poster
Rep: Reputation: 0
The find command is actually run with no error, but no other commands work.
 
Old 05-30-2001, 08:04 AM   #10
tyler_durden
Member
 
Registered: May 2001
Posts: 125

Rep: Reputation: 15
did you try updating the packages? also dont forget the command mysql_install_db to install the basic db files.
 
Old 05-30-2001, 10:18 AM   #11
jwill
LQ Newbie
 
Registered: May 2001
Posts: 7

Original Poster
Rep: Reputation: 0
When I tried to update the packages it gave me an error stating that the updated packages conflicted with the packages that were already installed and did not let me update. Again, I'm a novice with linux and may be doing something wrong. I think I did everything correctly. I'm a novice with Linux but I'm pretty adept in a wide variety of other operating systems and applications I hold certifications in Microsoft, Novell, Cisco, Prosoft, and CompTia. I say this so you know that I'm not a complete dummy, I just do not know a lot about Linux.
 
Old 05-30-2001, 11:48 AM   #12
tyler_durden
Member
 
Registered: May 2001
Posts: 125

Rep: Reputation: 15
i know the problem is witht he packages. i had the exact same problem with them. you may want to check the man page for rpm and force the packages. you can also try unistalling the current mysql packages then installing the new ones.
 
Old 05-31-2001, 03:48 PM   #13
jwill
LQ Newbie
 
Registered: May 2001
Posts: 7

Original Poster
Rep: Reputation: 0
Thanks, with out sounding too much of a dummy, I wonder if I could ask, How would I uninstall the packages?
 
Old 05-31-2001, 04:51 PM   #14
doodah
Member
 
Registered: Apr 2001
Location: Columbus,OH
Distribution: slackware
Posts: 122

Rep: Reputation: 15
$ rpm -qa | grep mysql

$ rpm -e NAME_OF_PACKAGE_TO_REMOVE

it may abort because of depends.. i usually just remove all deps, and do everything over(mysql shouldnt have very many depends.. i have never tried it with the --nodeps option...
but that will ignore all dependencies and just remove it...
 
Old 06-26-2001, 07:53 PM   #15
oulevon
Member
 
Registered: Feb 2001
Location: Boston, USA
Distribution: Slackware
Posts: 438

Rep: Reputation: 30
I ran into the same problem. I uninstalled and deleted the rpm's and then redownloaded them and everything worked fine the second go round.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
mysql on redhat subramd Linux - Software 1 09-07-2005 12:25 PM
MySql for Redhat 9.0 LinuxStart Linux - General 4 07-11-2005 03:30 PM
Installing MySQL.4.0.17 and php support for Mysql on RedHat 9.0 Neha Linux - Software 13 12-29-2003 12:06 AM
MySQL on Redhat 8.0 syzuhdi Linux - General 2 11-05-2002 08:37 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration