<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Tech-Recipes - Latest Comments in Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><atom:link href="https://tech-recipes.disqus.com/solve_can8217t_connect_to_local_mysql_server_through_socket_tmpmysqlsock_mysql_tech_recipes/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 25 Jul 2011 11:12:29 -0000</lastBuildDate><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-263492366</link><description>&lt;p&gt;try runing it as&lt;br&gt;/data/(folder in which mysql is installed)/mysql/bin/mysql&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chandan Singh Pachwal</dc:creator><pubDate>Mon, 25 Jul 2011 11:12:29 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-218988655</link><description>&lt;p&gt;Hi to all for me this problem occurred twice, so i just thought and understood the problem, when ever you are changing some config file related to mysql, better stop the service, edit you config, and start the service, then mysqld problem you will never face..&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gopinathkarangula</dc:creator><pubDate>Mon, 06 Jun 2011 06:54:30 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-163611830</link><description>&lt;p&gt;Calm down, maybe you are on the wrong message board. This is a technical message board. Sounds like you are looking for the Fisher Price Computer Users Group.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">computerically inclined?</dc:creator><pubDate>Thu, 10 Mar 2011 14:11:48 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-148813147</link><description>&lt;p&gt;yahya.nikandish@yahoo.com&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Yahya Nikandish</dc:creator><pubDate>Wed, 16 Feb 2011 12:52:59 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-116481047</link><description>&lt;p&gt;BTW also this occurs when your site under ddos attack.&lt;br&gt;In this situation mysqld will load high cpu usage too.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonym</dc:creator><pubDate>Tue, 21 Dec 2010 18:22:35 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-113536938</link><description>&lt;p&gt;Hello. I'm a real newbie to all this so would be grateful for answers in words of one syllable and sorry if this is obvious to everyone else, but most comments are going over my head. I think if I can get past this bit, then I should be OK to do everything I want to do, I'm just stuck here, trying to get a connection.&lt;/p&gt;&lt;p&gt;I'm getting the 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' error message.&lt;/p&gt;&lt;p&gt;I've set up my first MySQL database and its hosted on a remote web server so I don't have access to config files.  I'm on the client side, trying to connect so I can create some dynamic pages for my website.&lt;/p&gt;&lt;p&gt;My web hosting company are being less than helpful in helping me to sort this out. What sort of questions should I be asking them and then if they say I'm using the wrong socket, what php script would I need to specify (I would need it in full)?&lt;/p&gt;&lt;p&gt;Sorry, this must be really basic stuff for everyone else but it's causing me a lot of grief and if I can just get through this I can actually do some work....&lt;/p&gt;&lt;p&gt;Thanks in advance for any suggestions.&lt;/p&gt;&lt;p&gt;CJ&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">CJ</dc:creator><pubDate>Fri, 17 Dec 2010 06:51:33 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-109375779</link><description>&lt;p&gt;For xampp this command worke for me:&lt;br&gt;ln -s /opt/lampp/var/mysql/mysql.sock /var/run/mysqld/mysqld.sock &lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Arik_harel</dc:creator><pubDate>Thu, 09 Dec 2010 11:55:58 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-95794021</link><description>&lt;p&gt;Good lord, can SOMEONE say how to do it as if, and I'm just giving you an example, as if not everyone was computerically inclined? I think I must be one of the last 4 in thje USA and we're all sorry. I really have no idea what you're talking about, what these things mean and where all these icons with clamshells could be found, etc? So theres another user for my system? Where? And then again, please explain it as if I weren't a techie too if you can. I would be forever greatful....&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">cave_person_2</dc:creator><pubDate>Wed, 10 Nov 2010 03:12:14 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-86998795</link><description>&lt;p&gt;try this work for me&lt;/p&gt;&lt;p&gt;pkill mysqld&lt;br&gt;su mysql&lt;br&gt;mysql_install_db&lt;br&gt;chown -R mysql.mysql /var/lib/mysql/&lt;br&gt;mysqld_safe &amp;amp;&lt;br&gt;  &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Heri Anto マスター</dc:creator><pubDate>Thu, 14 Oct 2010 15:47:33 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-86998394</link><description>&lt;p&gt;pkill mysqld&lt;br&gt;su mysql&lt;br&gt;mysql_install_db&lt;br&gt;chown -R mysql.mysql /var/lib/mysql/&lt;br&gt;mysqld_safe &amp;amp;&lt;br&gt;  &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Heri Anto マスター</dc:creator><pubDate>Thu, 14 Oct 2010 15:46:25 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-79617962</link><description>&lt;p&gt;it worked for me on CentOS. mysql Server version: 5.0.77 &lt;br&gt;Thanks dude&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Deepak Frazer</dc:creator><pubDate>Mon, 20 Sep 2010 21:43:33 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-72992214</link><description>&lt;p&gt;Usually there's a hickup in your my.ini that will get you this message at the first mysql server restart after upgrading or changing your configuration.&lt;br&gt;Locate the .err file in your mysql/datadir and see what option is deprecated this time.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marco</dc:creator><pubDate>Sun, 29 Aug 2010 14:28:25 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-55255755</link><description>&lt;p&gt;thanks brother!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">muzie</dc:creator><pubDate>Tue, 08 Jun 2010 03:06:07 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-53470218</link><description>&lt;p&gt;Just want to add my humble thank you to the list.  I was updating our php version in preparation for another software update when things went south.  Could not figure out for the life of me why apache could not connect to mysql. Manual connection .... no problem.... apache -&amp;gt; php -&amp;gt; mysql .... problem&lt;/p&gt;&lt;p&gt;mysql.sock  .... running amok.  symbolic link solved the problem!&lt;/p&gt;&lt;p&gt;What a relief!&lt;/p&gt;&lt;p&gt;cheers!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pat</dc:creator><pubDate>Tue, 01 Jun 2010 21:35:20 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-43783587</link><description>&lt;p&gt;I would like to point out that, when performing tasks in an automated environment, such as setting up your mysql during kickstart installation, it important to note that if you execute mysql-related commands immediately after you start the mysql service, it is likely that your commands failed due to the mysql service "still in the progress" of starting up.&lt;/p&gt;&lt;p&gt;And the error message that you get would be similar that mysql.sock is not found.&lt;/p&gt;&lt;p&gt;The solution is simple. Allow for some delay between starting your mysql service, and performing your first mysql tasks, so that when the first mysql command is issued, the service is started and running properly. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benjamin See</dc:creator><pubDate>Wed, 07 Apr 2010 22:04:47 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-39720032</link><description>&lt;p&gt;Yes...this solution looks very simple.  Now, where the heck is the /etc/my.cnf file?!  I can't find it anywhere.  I'm so frustrated right now.  I have a hard time when I spend sooo much time just trying to get software working so I can actually get some work done!   &lt;br&gt;Thanks for the help.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">jdd540</dc:creator><pubDate>Mon, 15 Mar 2010 00:14:13 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-35769689</link><description>&lt;p&gt;Continuing to my earlier post I am not receiving the above error while connecting to the database but when I am running first ever query in my web page. Can somebody suggest another explanation?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gurmohan</dc:creator><pubDate>Sun, 21 Feb 2010 21:14:39 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-35769158</link><description>&lt;p&gt;Excellent explanation. But I still have a question. I have a different scenario. My mySQL database is on a different server with a hosting company and I am connecting from my client in my home. I am getting the same error. Is there something that can be done from my end to fix this error? Thanks anyways.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gurmohan</dc:creator><pubDate>Sun, 21 Feb 2010 21:04:51 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-34249411</link><description>&lt;p&gt;Fantastic!&lt;br&gt;I had the same problem and that was the solution.&lt;br&gt;Thanks a lot!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Albert</dc:creator><pubDate>Mon, 15 Feb 2010 05:00:55 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-31815090</link><description>&lt;p&gt;Another way to give the path for socket file is this:&lt;br&gt;connection=MySQLdb.connect(user="root",passwd="",db="python",unix_socket="/opt/lampp/var/mysql/mysql.sock")&lt;/p&gt;&lt;p&gt;This did wonders for me and I am really very thankful to this: &lt;a href="http://www.oesf.org/forum/index.php?showtopic=24885" rel="nofollow noopener" target="_blank" title="http://www.oesf.org/forum/index.php?showtopic=24885"&gt;http://www.oesf.org/forum/i...&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Hope this will help many others as it did for me.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">fundoonick</dc:creator><pubDate>Thu, 28 Jan 2010 11:26:55 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-30006374</link><description>&lt;p&gt;Please make sure that your disk having enough space..!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sinisha</dc:creator><pubDate>Fri, 15 Jan 2010 17:24:26 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-29310973</link><description>&lt;p&gt;i am getting this message&lt;/p&gt;&lt;p&gt;Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/content/07/5479507/html/kb/install/install_step3.php on line 61&lt;br&gt;Could not connect to the server: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)&lt;/p&gt;&lt;p&gt;what should i do?&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">elemiah</dc:creator><pubDate>Sun, 10 Jan 2010 20:07:54 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-20268567</link><description>&lt;p&gt;Wouldn't the link be removed at server reboot and the problem appear again??&lt;/p&gt;&lt;p&gt;I had the same problem but it is because my.cnf was not in the default locations&lt;/p&gt;&lt;p&gt;CLIENT:&lt;br&gt;Default options are read from the following files in the given order:&lt;br&gt;/etc/my.cnf ~/.my.cnf /usr/local/mysql/etc/my.cnf&lt;/p&gt;&lt;p&gt;So even when I added the [client] section I got the same error, so I did a link&lt;/p&gt;&lt;p&gt;#ln -s /my/cnf/file_location/my.cnf /etc/my.cnf&lt;/p&gt;&lt;p&gt;And it worked great.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">MarcoGlz</dc:creator><pubDate>Sat, 17 Oct 2009 12:55:28 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-17337886</link><description>&lt;p&gt;Man u have saved my life hehehe... very useful.&lt;/p&gt;&lt;p&gt;Thanku very much&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">NikoJr</dc:creator><pubDate>Thu, 24 Sep 2009 20:22:01 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-11933963</link><description>&lt;p&gt;Good day  qmchenry,&lt;/p&gt;&lt;p&gt;I try with de line:&lt;br&gt;mysql --socket=/var/lib/mysql/mysql.sock ...&lt;/p&gt;&lt;p&gt;but now the terminal list this error:&lt;/p&gt;&lt;p&gt;ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)&lt;/p&gt;&lt;p&gt;would you can help me&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">JEME</dc:creator><pubDate>Tue, 30 Jun 2009 10:25:56 -0000</pubDate></item></channel></rss>