after install mysql i restarted my pc and tried to started mysql i got the errors as Can't connect to local MySQL server through socket '/tmp/mysql.sock' so i googled and this url http://www.tech-recipes.com/mysql_tips762.html now it give me the error, Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' now i dunno wat to do Like alwayz your help is highly appreciated.
I assume you are running some sort of *nix based system if the error is complaining about /var/lib/ check /etc/my.cnf if you have one, if not, I believe mysql.sock default location is at /tmp/mysql.sock. If you find the location of it, you can set your client or whatever program it is trying to read that location. You'll also need to make sure that mysql is running, do a nmap on your local host and check to see if mysql port is enabled. If you can't figure out how to modify your connection client to read mysql.sock somewhere else, try a softlink. (ie #ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock). hope this help
OOFTA, I was having some big problems with this when I tried to instal MySQL on my computer. I finally decided to go with a program that automatically installed the whole package for me. I suggest that you try PHPTriad. It installs your server environment, php, and mysql with one click. It's free, and it's kinda nice.
I used to have that error on one of my sites, but it was because my sites SQL was down and it got fixed pretty fast. - Prilep
when i type the command: bin/mysqld_safe --user=mysql & and then try to start it, it starts working, can somebody throw some light on the above statement.
There is a known mysql bug where mysqld_safe starts automatically rather then starting mysql. http://bugs.mysql.com/bug.php?id=7249 What version of mysql are you using?
If its a local computer use xampp http://www.apachefriends.org/en/xampp-windows.html This installs an entire Lampp set up with loads more stuff, its really handy, it always works too. Thats the windows link but it availble for Linux too. I've had the same problem on remote servers, I just get it again and re-install, thats always worked for me.
sudo yum install mysql-serverorsudo apt-get install mysql-serverand then the command /etc/init.d/mysqld should fix all the rest of your mysql.sock issues