LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-15-2010, 04:23 PM   #1
Rocio911
LQ Newbie
 
Registered: Apr 2010
Posts: 1

Rep: Reputation: 0
Unhappy MySQL and FEDORA


Hi,
I am new using Linux and I do not know if this problem comes from mysql or linux.
I am trying to run mysql in Linux Fedora core 11. I installed mysql but when I tried to log in mysql as a root with mysql -s root -p. I am getting this error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I checked mysql.sock and this file is empty.

Do you have any suggestion?

Thanks,

Last edited by Rocio911; 04-15-2010 at 04:25 PM. Reason: syntax
 
Old 04-15-2010, 04:34 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Hi, welcome to LQ!

First, check which packages related to MySQL you installed:
Code:
rpm -qa | grep -i mysql
 
Old 04-15-2010, 04:56 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,633

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Rocio911 View Post
Hi,
I am new using Linux and I do not know if this problem comes from mysql or linux.
I am trying to run mysql in Linux Fedora core 11. I installed mysql but when I tried to log in mysql as a root with mysql -s root -p. I am getting this error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I checked mysql.sock and this file is empty.

Do you have any suggestion?

Thanks,
I'd suggest making sure that MySQL is running first. Do a "ps -ef | grep mysql", to see if anything is there. If not, as root, type in "/etc/init.d/mysql start"
 
Old 04-15-2010, 06:40 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Also, I think you meant

mysql -u root -p

not -s
 
Old 04-15-2010, 07:23 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Rocio911
1) how did you install mysql ? from yum and using the fedora rpm? or the mysql bin from the mysql web site?
2) have you set up a root account ??? ( i use phpMyAdmin)
3) is mysql running ? and is it a start up daemon or what ?

4) also fedora 11 is about to hit it's END OF LIFE in just over a month
so in about 60 days or less -- there will NEVER be any updates to fedora 11 ever .



please install the current fedora 12 or in about a month install fedora 13.
 
Old 04-16-2010, 07:22 AM   #6
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Quote:
Originally Posted by Rocio911 View Post
Hi,
I am new using Linux and I do not know if this problem comes from mysql or linux.
I am trying to run mysql in Linux Fedora core 11. I installed mysql but when I tried to log in mysql as a root with mysql -s root -p. I am getting this error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I checked mysql.sock and this file is empty.

Do you have any suggestion?

Thanks,
Post:
Code:
rpm -qa | grep mysql
ps aux | grep mysql
mysql -u root -p
 
Old 04-16-2010, 07:24 AM   #7
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Quote:
Originally Posted by Rocio911 View Post
Hi,
I am new using Linux and I do not know if this problem comes from mysql or linux.
I am trying to run mysql in Linux Fedora core 11. I installed mysql but when I tried to log in mysql as a root with mysql -s root -p. I am getting this error:
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
I checked mysql.sock and this file is empty.

Do you have any suggestion?

Thanks,
To restart mysqld daemon:
Code:
su
password: 
service mysqld restart
or
Code:
/etc/init.d/mysqld restart
 
  


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 not starting after changing mysql admin password in fedora prastal Linux - Newbie 1 02-20-2010 07:26 PM
Fedora 9:No mysql.sock file found. Cannot start mysql smilingbuddha Linux - Software 3 03-21-2009 03:06 AM
Problem Starting MySQL on Fresh Fedora 8 Install w/ Yum'd MySQL blong4life Linux - Server 2 07-04-2008 07:44 PM
Fedora Core 3, MySql Server, mysql started mysql ended OkiTek Fedora 30 01-28-2005 09:15 AM
MySQL 4 on Fedora can't install php-mysql kennyg Linux - Software 8 09-21-2004 06:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:15 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