LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-12-2007, 02:27 AM   #1
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Rep: Reputation: 15
MySql throwing connection error


hi fellows, I installed Fedora Core 5 with MySql server but now when i type
mysql -u username -p password
on the command prompt, it gives the following error
Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

can anyone help me out on this

Last edited by mystic_durle12; 12-12-2007 at 02:28 AM.
 
Old 12-12-2007, 07:02 PM   #2
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
Can you log in as root with no password?

I am not Fedora guy, but I do not expect that the mysql server was setup with any users except root and possibly a system user for rpm updates.


Also look at /etc/my.conf (or wherever Fedora stores my.conf) and see if you need to setup allowed connections. Pay particular attention to the option 'Skip Networking'.
 
Old 12-15-2007, 06:22 PM   #3
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
yesterday i had a major internet failure on my side. i would have replied yesterday. anyways its not working with root user too. Its giving the same error. and the /etc/my.conf u talk about is /etc/my.cnf on my system. i think its the same. I looks like this

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

tell me what do i need to do about it.
 
Old 12-15-2007, 10:45 PM   #4
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
That is quite a bit less than mine - but I have an idea...

Are you sure the mysql daemon (server) is running? If I shut mine down, I get EXACTLY the same error.

Code:
Stopping MySQL database server: mysqld.
ken@u2:~$ mysql -u ken -p********
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 
Old 12-17-2007, 11:14 PM   #5
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
can u plz tell me how to get server daemon up again.
 
Old 12-18-2007, 12:23 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,735

Rep: Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523
service mysqld start
 
Old 12-18-2007, 01:05 AM   #7
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
its not working fellow. it says that sqld service not a command.
 
Old 12-18-2007, 01:05 AM   #8
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
its not working fellow. it says that sqld service not a command.
tell me the exact command
 
Old 12-18-2007, 01:12 AM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,735

Rep: Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523
Please show exactly what cmd you typed and what the error msg was. Your answer is different to my example ....
 
Old 12-18-2007, 01:31 AM   #10
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
i have tried both of them and this is the error message.

[root@localhost Tampa]# mysqld start
bash: mysqld: command not found

[root@localhost Tampa]# service mysqld start
bash: service: command not found
 
Old 12-18-2007, 01:39 AM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
Look at the output of "sudo /sbin/chkconfig -l". Do you see an entry with mysql in the name?
How did you install the mysql server? Did you maybe just install the client and not the server?

Also, why did you install such an old Fedora Core version? The current is Fedora Core 8.

Last edited by jschiwal; 12-18-2007 at 01:41 AM.
 
Old 12-18-2007, 01:52 AM   #12
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
it has this line in it
mysqld 0 : off 1 : off 2 : off 3 : off 4 : off 5 : off 6 : off
its off for all run levels
how can i get it on again
and about the old version of FC. i have a slow dial up connection and i find it hard to download a new version of FC

Last edited by mystic_durle12; 12-18-2007 at 01:54 AM.
 
Old 12-18-2007, 02:28 AM   #13
mystic_durle12
Member
 
Registered: Feb 2005
Location: Pakistan
Distribution: Red Hat 9
Posts: 109

Original Poster
Rep: Reputation: 15
should i simply turn it on. and is there a gui solution to it
 
Old 12-18-2007, 06:48 PM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,735

Rep: Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523Reputation: 2523
Yeah, it should be in the menus if it's installed. Unfortunately my FC box is at home and I'm at work (suse), so I can't remember the menu path.
 
Old 12-19-2007, 10:18 AM   #15
kzutter
Member
 
Registered: Nov 2007
Location: Carson City, NV USA
Distribution: Various, but always Debian based
Posts: 70

Rep: Reputation: 15
Here is the Fedora FAQ URL for starting services:
http://www.fedorafaq.org/basics/#startprogram
 
  


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
USB is autodetecting but when its pull out throwing error sathyguy Linux - Newbie 4 08-22-2007 07:39 AM
Shared Home Directory Throwing Error Ingla Ubuntu 6 08-06-2007 06:21 AM
SuSE YOU - throwing error neocookie Linux - Software 3 10-25-2004 02:58 PM
Qt Designer + mySql connection error vanquisher Programming 1 08-24-2004 02:21 PM
Mysql Error: Lost Connection to Mysql during query ramnath Programming 5 11-18-2003 12:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration