0

Hi friends

I'm installing mysql on linux system through rpm.
when i'm entering 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!

when i'm trying to connect its giving me error like

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
plz help me in this

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by cwarn23
0

Now that you have downloaded mysql, next you need to install it's services so that mysqld/mysql will start on bootup. After that php should be able to recognize mysql. So try and google "how to setup mysql service on <your linux brand>" then if you have any further troubles tell us what variation of linux you have.

0

hi there,

I have install rpms
MySQL-client-5.1.41-0.glibc23.i386.rpm
MySQL-server-5.1.41-0.glibc23.i386.rpm
MySQL-shared-compat-5.1.41-0.glibc23.i386.rpm

does it req. Mysql-client-community.i385.rpm
Mysql-community..... package also

Now that you have downloaded mysql, next you need to install it's services so that mysqld/mysql will start on bootup. After that php should be able to recognize mysql. So try and google "how to setup mysql service on <your linux brand>" then if you have any further troubles tell us what variation of linux you have.

0

hi friends
I'm using centos.

I'm starting mysql service through

service mysqld start

it showing

unrecognised service

and when I execute mysql it showing

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

whats the problem ??????????

0

Perhaps it is some configurations that may need changing now that you have installed the software. Although I'm not too good at configuring mysql you could start by checking if there are any configurations in /var/lib/mysql/mysql.sock In case you don't realize the error code you have mentioned is 2002 which will help when searching the web but as for my opinion, I'm not too sure on this as I myself haven't encountered this error before. Hope that helps...

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.