Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
my.cnf missing on all directories after new mysql installtion

I need to run MySQL service for my linux 2.16 version with SUSE version 11 distribution. Downloaded the following files and installed all the rpms as under:


There was no error during installation and I have confirmed the installed packages via:

rpm -qa|grep -i sql

But the server is not getting started when trying to execute through:

$> mysql

M getting the following as eror msg:

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

I have checked that in the /etc/init.d location, only mysql entry is there instead of mysqld, is this the reason of the server startup error.

On googling for hours, I have also tried ./mysql start from the same location but getting the following output:

Starting MySQL..The server quit without updating PID file (/var/lib/mysql/

I am new to mysql, any help will be appreciated. Thanks in advance.

I have cheked and found that some configuration files have been in the /usr/share/mysql loaction, and I have copied my-huge.cnf file to /etc location, any comments ?

Following is the content from the same my.cnf file:

port            = 3306
socket          = /var/lib/mysql/mysql.sock
key_buffer_size = 384M
max_allowed_packet = 1M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M

thread_concurrency = 8


server-id       = 1

max_allowed_packet = 16M


key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

share|improve this question

marked as duplicate by Michael Hampton, Ward, Scott Pack, John Gardeniers, Brent Pabst Oct 15 '12 at 14:55

This question was marked as an exact duplicate of an existing question.

Just try /etc/init.d/mysql start and check the log files, usually in /var/log/mysql. – golja Sep 26 '12 at 11:10
Thanks but on trying to start mysql, even m wondering why but there is not any log file for mysql in the location /etc/init.d !! – Manroop Sep 26 '12 at 11:14
The right directory is /var/log, not /etc/init.d ! – AndrewQ Sep 26 '12 at 11:26
ya i have posted dat wrong in my above cmment, i have cheked but there isnt any log file created for mysql in d location /var/log !! – Manroop Sep 26 '12 at 11:38
Please post the content of the file /etc/my.cnf – AndrewQ Sep 26 '12 at 11:55

Looks a lot like permission issues check that /var/lib/mysql is owned by the same user as the one running the mysql daemon.

share|improve this answer

It seems that your package is malformed or incomplete.

To solve this, create your own my.cnf file.

Verify that a 'mysql' user has been created. If not, create auser mysql and a group mysql.

In /etc create my.cnf with a minimal set of settings:




This should be enough to keep mysqld up and running. of course, you have to add your settings. Start the server using /etc/init.d/mysql start (or the command that your distro uses to start a service).

If the server starts, you have to create the root user (usually with 'mysqladmin -u root -p password' and 'mysqladmin -h hostname -u root -p password')

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.