LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-10-2004, 09:35 PM   #1
race
Member
 
Registered: Nov 2003
Distribution: debian
Posts: 66

Rep: Reputation: 15
mysql sockets


coming from a windows world... when i want to work with the mysql dbms i type mysql into the command. i do that in linux and i get

me@MyAgony:~$ mysql
ERROR 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/
mysqld.sock' (111)
me@MyAgony:~$


when i go to the folder that the error specifies there is nothing there... whats up with that??

also do i have to set permissions to get some user accounts going?


thanks, race

btw im running debian 3 with mysql 3.2.....
 
Old 03-11-2004, 06:29 AM   #2
linuxxed
Member
 
Registered: Feb 2004
Posts: 273

Rep: Reputation: 30
is mysqld server running? It normally listens on 3306 port.

lsof -i:3306

What happens when you do a

telnet localhost 3306
 
Old 03-11-2004, 07:10 AM   #3
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
There are a couple of things to check.

1) Check in your /root .bash_profile file and insure that your PATH line reads as PATH=$PATH:$HOME/bin:/usr/local/mysql/bin

2) Make sure that whatever user you're trying to log into MySQL with has file permissions to access the database

3) Check /etc/my.cnf and insure that the correct paths are listed for file access

4) Make sure that the MySQL daemon is in fact actually running. ps -ef | grep mysql. Should return about three or four lines with different processes running.

5) Try logging in : /usr/local/mysql/bin/mysqld_safe --user=mysql & (This of course depends on if you have a user called mysql)

I had the same problem with my mysql and it mostly was file access permissions. I am installing an IDS system with Snort and I had to make sure that my user "snort" had permission to access the files. I simply made him/her a member of the mysql group and allowed that group to have access. Seemed to work. I still don't have it all the way up but am progressing. Try these things and repost if you don't have success.
 
Old 03-11-2004, 10:30 AM   #4
race
Member
 
Registered: Nov 2003
Distribution: debian
Posts: 66

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by linuxxed
is mysqld server running? It normally listens on 3306 port.

lsof -i:3306

What happens when you do a

telnet localhost 3306
this is what i get

MyAgony:/home/me# lsof -i:3306
MyAgony:/home/me#

MyAgony:/home/me# telnet localhost 3306
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
MyAgony:/home/me#
 
Old 03-11-2004, 10:53 AM   #5
race
Member
 
Registered: Nov 2003
Distribution: debian
Posts: 66

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by ScooterB
There are a couple of things to check.

1) Check in your /root .bash_profile file and insure that your PATH line reads as PATH=$PATH:$HOME/bin:/usr/local/mysql/bin !!!! I that file does not exist in my /root folder !!!

2) Make sure that whatever user you're trying to log into MySQL with has file permissions to access the database

3) Check /etc/my.cnf and insure that the correct paths are listed for file access

!!!! I that file does not exist in my /etcfolder !!!



4) Make sure that the MySQL daemon is in fact actually running. ps -ef | grep mysql. Should return about three or four lines with different processes running.

5) Try logging in : /usr/local/mysql/bin/mysqld_safe --user=mysql & (This of course depends on if you have a user called mysql)

I had the same problem with my mysql and it mostly was file access permissions. I am installing an IDS system with Snort and I had to make sure that my user "snort" had permission to access the files. I simply made him/her a member of the mysql group and allowed that group to have access. Seemed to work. I still don't have it all the way up but am progressing. Try these things and repost if you don't have success.



I am starting to get the feeling that i didnt actually install mysql properly
but take a look at this

MyAgony:/home/me# dpkg -l | grep mysql
ii libdbd-mysql-p 1.2216-2 mySQL database interface for Perl
ii libmysqlclient 3.23.49-8.5 mysql database client library
ii mysql-client 3.23.49-8.5 mysql database client binaries
ii mysql-common 3.23.49-8.5 mysql database common files (e.g. /etc/mysql
ii mysql-server 3.23.49-8.5 mysql database server binaries
ii php4-mysql 4.1.2-6woody3 MySQL module for php4
MyAgony:/home/me#

This is why i love linux some much!!
 
Old 03-11-2004, 12:03 PM   #6
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
One thing I should have pointed out was that I am talking from a RH9 perspective and the paths that I talked about are from that reference. The biggest thing to check is to make sure that all of the paths are properly listed and that whomever is signing in actually has Linux permissions to those directories and files. I fought with file permissions for days before I actually got it right, and then only after getting mysql's tech support involved. Which I do have to admit, are the best!! I am not that familiar with Debian yet, but soon.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 07:19 AM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
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 sockets error Amerist Linux - Software 3 09-14-2002 05:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:05 AM.

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