LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-29-2010, 09:20 PM   #1
sammy007
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
Unhappy Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


Hi i bought a new laptop two months ago it had everything installed so i didnt need to faff around with it by installing anything. my daughter plays a game online and suddenly to day it has brought up this error meaasge Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2). im not much of a computer person and looked at the replys to previous posts but didi not understand a word lol.

Can anyone help me and tell me in specific detail in what to do? i really do not know what i am doing thanx
 
Old 01-30-2010, 07:32 AM   #2
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
As you probably know, MySQL is a data base management system, a DBMS, that is included with, well, pretty much every Linux distribution. MySQL is "there," but it's not usually initialized so you can use it.

What you need to do is log in as root and open a terminal window (so you can type some commands); note that you must be root to do this.
Code:
log in as root
< first you must initialize the DBMS  with this command >
prompt: mysql_install_db --user=mysql
< when that completes, you need to make it secure >
prompt: mysql_secure_installation
mysql_secure_installation will prompt you with default values for "locking-down" your MySQL installation.

You do not indicate what distribution you're running (that Microsoft avatar is a little scary here) so the next step is going to take a little effort on your part -- once MySQL is initialized (above), it must be started running -- it runs as a daemon process, that is, it starts up and just sort of sits there waiting for somebody to do something with it. You can start it manually whenever you want to use it (you must do that as root or by using sudo) or you can have it start up at system boot.

Manually starting MySQL is done by
Code:
log in as root or use sudo
< start the MySQL daemon >
prompt: mysql_safe &
Automatically starting it at boot time is distribution-dependent and you will need to look at your system documentation (or the distribution web site) for guidance on where and how to do that; it's not complicated, but it differs from distribution to distribution and without knowing what you have, well, it's a crap-shoot to tell you how.

On caveat, here: your daughter is playing games on-line and something wanted access to your data bases (if you had any) might be a indication that maybe she shouldn't be playing games on that particular web site? Just a thought.

Hope this helps some.

Last edited by tronayne; 01-30-2010 at 07:51 AM.
 
  


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
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock welery Linux - Software 19 03-06-2014 08:19 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) Pode Slackware 12 11-26-2008 09:21 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' mohadesz Linux - Server 3 03-15-2008 06:06 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' mathimca05 Linux - Newbie 2 10-17-2007 03:04 AM
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) sunlinux Linux - Software 1 11-07-2006 01:08 AM

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

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