LinuxQuestions.org
Visit Jeremy's Blog.
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, 05: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 05:25 PM. Reason: syntax
 
Old 04-15-2010, 05:34 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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

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

Rep: Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440Reputation: 4440
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, 07:40 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,411

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

mysql -u root -p

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

Rep: Reputation: 2520Reputation: 2520Reputation: 2520Reputation: 2520Reputation: 2520Reputation: 2520Reputation: 2520Reputation: 2520Reputation: 2520Reputation: 2520Reputation: 2520
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, 08:22 AM   #6
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Rep: Reputation: 63
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, 08:24 AM   #7
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,031

Rep: Reputation: 63
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


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

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

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