I've installed folowing mysql components on linux redhat rpm -qa | grep -i sql MySQL-client-4.1.8-0 MySQL-server-4.1.8-0 MySQL-devel-4.1.8-0 MySQL-shared-4.1.8-0
I tried to start mysql /etc/rc.d/init.d/mysql start Process dosen't starts also used
$/usr/bin/mysqld_safe &  6436 $Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid 050113 19:46:16 mysqld ended
+ Done sudo /usr/bin/mysqld_safe
I am getting following error when I am trying to run mysqladmin $sudo /usr/bin/mysqladmin -u root password newdb Password: /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
$mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Well, your packages are OK, it seems (you could double-check with rpm -V). It's possible that you either need firewall (iptables) rules to contact the MYSQL port or need to configure MYSQL to use sockets. I think MYSQL comes setup for sockets, but I'm not sure - PostgreSQL doesn't (on redhat).
I recommend starting the server like so:
/sbin/service mysql start
It may show the status a little better. Also look for errors in /var/log/messages.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
Originally posted by shivani anand: As suggested by you what needs to be done regarding following... It's possible that you either need firewall (iptables) rules to contact the MYSQL port or need to configure MYSQL to use sockets
Not sure how you configured MySQL, but the last time I played with it, it is configured to used both sock files, and network connections. By default, it will use the sock file if it is the localhost, and it will use the port otherwise. There is also a switch to override it.
BTW, you should use a local connection first, as you need to connect to grant the privileges for the remote connection.