<?xml version="1.0" encoding="utf-8"?>
<rss 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 | MySQL | Tech-Recipes</title><link>http://tech-recipes.disqus.com/</link><description>Cookbook of Tech Tutorials</description><language>en</language><lastBuildDate>Tue, 30 Jun 2009 10:25:56 -0000</lastBuildDate><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-11933963</link><description>Good day  qmchenry, &lt;br&gt;&lt;br&gt;I try with de line:&lt;br&gt;mysql --socket=/var/lib/mysql/mysql.sock ...&lt;br&gt;&lt;br&gt;but now the terminal list this error:&lt;br&gt;&lt;br&gt;ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)&lt;br&gt;&lt;br&gt;&lt;br&gt;would you can help me</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><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-11918684</link><description>Hi guys, I to have this problem and I'm new to mySQL and PHP. Where are you guys locating all these directories such as: /var/lib/mysql or /usr/local/mysql/data ?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steven Sheffey</dc:creator><pubDate>Mon, 29 Jun 2009 20:37:04 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-9282643</link><description>Excellent nugget of information:&lt;br&gt;&lt;br&gt;    It came in real handy when the geniouses at opensuse broke an update of mysql to mysql-5.1.34-29.1 by putting the mysql.sock and mysqld.pid in /var/run/mysql instead of /var/lib/mysql as normal. Great quick fix was found here. In addition to /etc/my.cnf, the init script at /usr/sbin/rcmysql needed to be fixed as well.&lt;br&gt;&lt;br&gt;    Thanks</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David C. Rankin, J.D.,P.E.</dc:creator><pubDate>Wed, 13 May 2009 11:25:37 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-6285110</link><description>of course in this problem command:&lt;br&gt;&lt;br&gt;mysql_connect("localhost",...);&lt;br&gt;&lt;br&gt;not work</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gogster</dc:creator><pubDate>Sun, 15 Feb 2009 17:23:45 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-6285074</link><description>I am on client side. I can't change serwer settings. Can send php scripts only! It would be usefull if it will be my own serwer, but it isnt.. So your's advice is useless..&lt;br&gt;&lt;br&gt;The reason fo client is bad serwer name in "mysql_connect" function. For example database is:&lt;br&gt;"http://abc.def.ghi.com/mysql5/"&lt;br&gt;so you should use it properly like this:&lt;br&gt;&lt;br&gt;mysql_connect("abc.def.ghi.com",...);&lt;br&gt;&lt;br&gt;insted of not properly like this:&lt;br&gt;&lt;br&gt;mysql_connect("http://abc.def.ghi.com/mysql5/",...);</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gogster</dc:creator><pubDate>Sun, 15 Feb 2009 17:21:22 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-5644376</link><description>can this type of error be generated by  something like:&lt;br&gt;mysql_fetch_assoc();&lt;br&gt;/*as you can see the resource parameter of mysql_fetch_assoc(&amp;lt;$resource&amp;gt;)*/ is missing&lt;br&gt;do help please...!!!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">obaid</dc:creator><pubDate>Thu, 29 Jan 2009 02:29:09 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-4930192</link><description>I found the following in the MySQL documentation:&lt;br&gt;&lt;br&gt;1. Log in as the root user. ("Start" =&amp;gt; "Switch User")&lt;br&gt;2. Open a terminal window (the icon that looks like a monitor behind a clamshell).&lt;br&gt;3. Type "cd /bin" enter (no quotes). :: usually not nessecary ::&lt;br&gt;4. Type "mysql_install_db --user=mysql&lt;br&gt;&lt;br&gt;This is from: &lt;a href="http://www.novell.com/coolsolutions/feature/595" rel="nofollow"&gt;http://www.novell.com/coolsolutions/feature/595&lt;/a&gt;...</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">arun</dc:creator><pubDate>Tue, 06 Jan 2009 02:30:44 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-4163303</link><description>turkey</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">özcan</dc:creator><pubDate>Thu, 04 Dec 2008 04:35:07 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-3896241</link><description>Should I be able to connect to MySQL over my LAN? I am running MAMP on Tiger, and can connect using MAMP's built in tools, but preferred the look of Sequel Pro, which I can use to connect with MySQL on the local machine using LocalHost, root user, and password, port 8889 and Socket: /Applications/MAMP/tmp/mysql/mysql.sock. However when I try to connect to that Mac from another on the LAN, which works to MAMP fine via &lt;a href="http://192.168.0.4:8888/" rel="nofollow"&gt;http://192.168.0.4:8888/&lt;/a&gt; It says Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2). I'm confused. MAMP's using port 8888, and MySQL's using port 8889. How can I get pass both in the URL? Or am I all wrong here? Any suggestions?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jonathan Dear</dc:creator><pubDate>Wed, 19 Nov 2008 11:47:40 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-2768821</link><description>&amp;lt;ul id="quote"&amp;gt;&amp;lt;h6&amp;gt;hans gruber wrote:&amp;lt;/h6&amp;gt;This may *sound* like a kludge as this will **CONFIRM** the abovestated steps.  &lt;br&gt;&lt;br&gt;Simply create a symbolic link under the "/tmp" directory BACK to the "mysql.sock" file.  Make sure that it's worldwide read/write-able.  To do so would be like this:&lt;br&gt;&lt;br&gt;cd /tmp&lt;br&gt;ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock&lt;br&gt;&lt;br&gt;Try it then -- if it is still having trouble, then you might have something else wrong; otherwise, this is because of the RPM installation that you might've used from Red Hat (aka "Fedora").&lt;br&gt;&lt;br&gt;Just a friendly hint....cheers!&lt;br&gt;&lt;br&gt;hg&amp;lt;/ul&amp;gt;&lt;br&gt;&lt;br&gt;Actually, this helped tremendously. I am on OS X 10.5 and I don't seem to have a my.cnf file. However, when I tried to connect to mysql, I got the norm error can't connect to  . . . through socket . . . "/var/mysql/mysql.sock". A quick search confirmed that /var/mysql/mysql.sock did not exist. I would not have known how to fix this (as a copy paste would not have worked for a socket file) so your post was the solution I implemented, creating a link in /var/mysql that targeted the /tmp/mysql.sock&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks!&lt;br&gt;&lt;br&gt;crab</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sun, 21 Sep 2008 12:38:43 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-2768820</link><description>For SUSE uers (maybe others)..&lt;br&gt;&lt;br&gt;:: QUOTE ::&lt;br&gt;YaST stops a little short of fully installing MySQL. ...&lt;br&gt;&lt;br&gt;I checked the /var/lib/mysql/ directory only to find it empty! This directory is supposed to include the MySQL foundation files that are necessary to make it all work.&lt;br&gt;&lt;br&gt;I found the following in the MySQL documentation:&lt;br&gt;&lt;br&gt;   1. Log in as the root user. ("Start" =&amp;gt; "Switch User")&lt;br&gt;   2. Open a terminal window (the icon that looks like a monitor behind a clamshell).&lt;br&gt;   3. Type "cd /bin" enter (no quotes). :: usually not nessecary ::&lt;br&gt;   4. Type "mysql_install_db --user=mysql&lt;br&gt;&lt;br&gt;This is from: &lt;a href="http://www.novell.com/coolsolutions/feature/595.html" rel="nofollow"&gt;http://www.novell.com/coolsolutions/feature/595...&lt;/a&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 06 Nov 2007 00:42:30 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-2768819</link><description>Also, this message could mean the the deamon mysqld isn't running, and no socket file has been created.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paradigm</dc:creator><pubDate>Wed, 23 Mar 2005 06:26:44 -0000</pubDate></item><item><title>Re: Solve: Can&amp;#8217;t connect to local MySQL server through socket /tmp/mysql.sock | MySQL | Tech-Recipes</title><link>http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-2768818</link><description>This may *sound* like a kludge as this will **CONFIRM** the abovestated steps.  &lt;br&gt;&lt;br&gt;Simply create a symbolic link under the "/tmp" directory BACK to the "mysql.sock" file.  Make sure that it's worldwide read/write-able.  To do so would be like this:&lt;br&gt;&lt;br&gt;cd /tmp&lt;br&gt;ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock&lt;br&gt;&lt;br&gt;Try it then -- if it is still having trouble, then you might have something else wrong; otherwise, this is because of the RPM installation that you might've used from Red Hat (aka "Fedora").&lt;br&gt;&lt;br&gt;Just a friendly hint....cheers!&lt;br&gt;&lt;br&gt;hg</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hans gruber</dc:creator><pubDate>Mon, 22 Nov 2004 04:48:39 -0000</pubDate></item></channel></rss>