Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-23-2008, 08:37 AM   #1
LQ Newbie
Registered: Feb 2006
Posts: 17

Rep: Reputation: 0
Cannot access mySQL


I'm very much a beginner but very keen to learn as much as I can about running a Linux based web much so I'm renting out my own vps and trying to teach myself.

I know that php is already installed but I've come up against my first obstacle with accessing mySQL. At the command line I type in mysql -u etc etc. and I get the following error message.

"can't connect to local MySQL server through socket 'var/lib/mysql/mysql.sock' (2)"

Can someone please tell me what this means and what the cause and remedy is. (could it be that mySQL is not is the help page for setting up php and mySQL provided by the company I rent the vps from, I mention it on the off chance it may provide info that's specific to this server.

Please bear in mind I'm a beginner so if any answers are in simple please be gentle with me ;-)
Old 01-23-2008, 08:46 AM   #2
Registered: Sep 2007
Posts: 84

Rep: Reputation: 15
I ran into something similar when I first installed mysql. It turns out you really need TWO packages to make mysql run, mysql-client and mysql-server. I suspect you only have mysql-client.

Logged in as root, try "yum install mysql-server" and see if that doesn't improve things.
Old 01-23-2008, 09:04 AM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680
You may also get that message if the mysql server is installed but not running.


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 - can't access mysql database as root yogaboy Linux - Software 5 12-28-2006 06:58 AM
How access MySQL by MySQL Administrator? treotan Linux - Newbie 5 12-04-2004 10:17 PM
Access to Mysql munna_502 Linux - Software 2 04-20-2004 03:51 PM
from access to mysql ? abd_bela Programming 1 02-12-2004 07:57 AM
mysql and access mychl Programming 2 06-11-2003 06:00 PM > Forums > Linux Forums > Linux - Newbie

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

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