LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-18-2010, 04:27 AM   #1
harrysingh
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Rep: Reputation: 0
Red face help me on this mysql error at run time


ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

following my.cnf setting plz suggest me why this error is coming

#BEGIN CONFIG INFO
#DESCR: 4GB RAM, InnoDB only, ACID, few connections, heavy queries
#TYPE: SYSTEM
#END CONFIG INFO



#
# The following options will be read by MySQL client applications.
# Note that only client applications shipped by MySQL are guaranteed
# to read this section. If you want your own MySQL client program to
# honor these values, you need to specify it as an option during the
# MySQL client library initialization.
#
[client]
#password = [your_password]
port = 3306
socket = /var/lib/mysql/mysql.sock

# *** Application-specific options follow here ***

#
# The MySQL server
#
[mysqld]

# generic configuration options
port = 3306
socket = /var/lib/mysql/mysql.sock

default_table_type = innoDB
skip-bdb


# *** INNODB Specific options ***


#skip-innodb

innodb_data_file_path = ibdata1:500M:100M:autoextend


#innodb_data_home_dir = <directory>


innodb_file_io_threads = 4


#innodb_force_recovery=1




[mysqldump]
# Do not buffer the whole result set in memory before writing it to
# file. Required for dumping very large tables
quick

max_allowed_packet = 16M

[mysql]
no-auto-rehash

# Only allow UPDATEs and DELETEs that use keys.
#safe-updates

[isamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M

[myisamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
# Increase the amount of open files allowed per process. Warning: Make
# sure you have set the global system limit high enough! The high value
# is required for a large number of opened tables
open-files-limit = 8192

Last edited by harrysingh; 06-19-2010 at 05:59 AM. Reason: spelling correction
 
Old 06-18-2010, 05:06 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

Check if mysqld is running
Code:
ps -ef|grep mysqld
and that the socket is created in /var/lib/mysql/mysql.sock
Also give some more details for your system and how did you install mysql

Regards
 
Old 06-18-2010, 05:10 AM   #3
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
Edit:
What he said
 
Old 06-19-2010, 05:55 AM   #4
harrysingh
LQ Newbie
 
Registered: Jun 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Unhappy

Quote:
Originally Posted by bathory View Post
Hi,

Check if mysqld is running
Code:
ps -ef|grep mysqld
and that the socket is created in /var/lib/mysql/mysql.sock
Also give some more details for your system and how did you install mysql

Regards
Thnx for reply
i had installed through urpmi and installed successfully and run mysql through command line its show temp database and so on(installed with mysql) but when i had changed in my.cnf file in data dir and made another data dir such as ibdata1:500M;ibdata:500M;ibdata3:100M:autoextend then i had again run mysql service its show socket error such as defined in my post four your better understand my code under var/lib/mysql is
drwx--x--x 3 mysql mysql 20K 2010-06-19 15:08 ./
drwxr-xr-x 28 root root 4.0K 2010-06-19 14:35 ../
-rw-rw---- 1 mysql mysql 500M 2010-06-19 14:43 ibdata1
-rw-rw---- 1 mysql mysql 500M 2010-06-19 14:43 ibdata2
-rw-rw---- 1 mysql mysql 100M 2010-06-19 14:43 ibdata3
-rw-rw---- 1 mysql mysql 5.0M 2010-06-19 15:08 ib_logfile0
-rw-rw---- 1 mysql mysql 5.0M 2010-06-19 14:43 ib_logfile1
srwxrwxrwx 1 mysql mysql 0 2010-06-19 15:03 mysqlmanager.sock=
drwx--x--x 2 mysql mysql 4.0K 2010-06-19 15:08 .tmp/
after this run mysql service its failed and show error plz help me on this
 
Old 06-19-2010, 11:26 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

Comment out
Quote:
innodb_file_io_threads = 4
and try to restart mysqld.
It looks like a bug of mysql

Regards
 
  


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 5.0.67: Unable to install & run. Error /var/lib/mysql/mysql.sock' (2) peteyperson Linux - Server 2 03-04-2009 02:16 PM
Run Time Value Error Tidi Linux - Server 0 05-07-2007 11:19 AM
run time level error Disqualifier Linux - General 1 11-11-2005 10:08 PM
eroaster-2.0.12 run-time error cpv204 Linux - Software 5 04-04-2004 08:13 PM
The code cause a run time error Linh Programming 9 07-11-2003 09:17 AM


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