0

hi friends,

I'm trying to install mysql on linux through rpm. I have install it & when I'm I enter the command

mysqladmin -u root -p create mydb

its showing
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

so what is the problem. can anyone tell me. PLZ.

when i;m trying to connect its showing

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

Edited by talk2sachi: n/a

5
Contributors
10
Replies
11
Views
8 Years
Discussion Span
Last Post by jbennet
0

Hi there,

I'm using centOS. so any idea ?

what distor do you have?
in Mandriva use urpmi, Suse there is Yast or zypper ...et al

0

Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!

Probably your mysql service 'mysqld' is not running...
Check with...

service mysqld status

If not running, start with... (as root)

service mysqld start

To always activate the service on boot...

chkconfig mysqld on

On Fedora systems (CentOS is alike) you can activate via the Gnome menu: System - Administration - Services

Edited by Firewolf: n/a

0

still not working

what distor do you have?
in Mandriva use urpmi, Suse there is Yast or zypper ...et al

0

Have you set a root password for MySQL? In a standard installation, the root password is empty. You first have to set it.

mysqladmin -u root password NEWPASSWORD

0

Check to see if you have the server and not just the client installed.

yum list | grep mysql

will list all of the packages and you can see what is installed. My centOS 5 systems listed the following:
[root@srvr3 ~]# yum list | grep mysql
mysql.i386 5.0.77-4.el5_4.1 installed
mysql.x86_64 5.0.77-4.el5_4.1 installed
mysql-bench.x86_64 5.0.77-4.el5_4.1 installed
mysql-devel.i386 5.0.77-4.el5_4.1 installed
mysql-devel.x86_64 5.0.77-4.el5_4.1 installed
mysql-server.x86_64 5.0.77-4.el5_4.1 installed
perl-DBD-mysql.x86_64 4.013-1.el5.rf installed
php-mysql.x86_64 5.1.6-24.el5_4.5 installed

0

hey thanx to everyone for helping me to install mysql on linux successfully.

0

Also, in case anyone happens to stumble across this thread in google, that /var/lib/mysql/mysql.sock error also occurs when the process cant get enugh memory (256mb minimum, preferably 512mb+)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.