<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Can&#8217;t connect to local MySQL server through socket /tmp/mysql.sock</title>
	<atom:link href="http://www.512kbps.com/2008/01/06/cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.512kbps.com/2008/01/06/cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/</link>
	<description>FUBAR - Fucked Up Beyond Any Recognition</description>
	<pubDate>Fri, 05 Dec 2008 09:52:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-RC1-10015</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: LOL</title>
		<link>http://www.512kbps.com/2008/01/06/cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/comment-page-1/#comment-4805</link>
		<dc:creator>LOL</dc:creator>
		<pubDate>Sat, 20 Sep 2008 09:56:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.512kbps.com/2008/01/06/cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-4805</guid>
		<description>Programare Sociala this is a cPanel tut, so you r tha bullshiter... this is correct..&lt;div class="comment-remix-meta"&gt;&lt;a href="#" class="replyto" onclick="replyto('4805','LOL'); return false;"&gt;Reply&lt;/a&gt;  - &lt;a href="#" class="quote" onclick="quote('4805','LOL','Programare Sociala this is a cPanel tut, so you r tha bullshiter... this is correct..'); return false;"&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>Programare Sociala this is a cPanel tut, so you r tha bullshiter&#8230; this is correct..
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('4805','LOL'); return false;">Reply</a>  - <a href="#" class="quote" onclick="quote('4805','LOL','Programare Sociala this is a cPanel tut, so you r tha bullshiter... this is correct..'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.512kbps.com/2008/01/06/cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/comment-page-1/#comment-4530</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 07 Jan 2008 19:44:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.512kbps.com/2008/01/06/cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-4530</guid>
		<description>aia e bullshit pentru noobs in situatia in care nu se foloseste cpanel or stuff :)&lt;div class="comment-remix-meta"&gt;&lt;a href="#" class="replyto" onclick="replyto('4530','admin'); return false;"&gt;Reply&lt;/a&gt;  - &lt;a href="#" class="quote" onclick="quote('4530','admin','aia e bullshit pentru noobs in situatia in care nu se foloseste cpanel or stuff :)'); return false;"&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>aia e bullshit pentru noobs in situatia in care nu se foloseste cpanel or stuff <img src='http://www.512kbps.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('4530','admin'); return false;">Reply</a>  - <a href="#" class="quote" onclick="quote('4530','admin','aia e bullshit pentru noobs in situatia in care nu se foloseste cpanel or stuff :)'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Programare Sociala</title>
		<link>http://www.512kbps.com/2008/01/06/cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/comment-page-1/#comment-4529</link>
		<dc:creator>Programare Sociala</dc:creator>
		<pubDate>Mon, 07 Jan 2008 17:04:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.512kbps.com/2008/01/06/cant-connect-to-local-mysql-server-through-socket-tmpmysqlsock/#comment-4529</guid>
		<description>Bulshiiiiiiiiittttt!!!! :D

When the application and the mysql database reside on the same machine, you can forget about connecting through network sockets (which is the equivalent of connecting to IP: 127.0.0.1) and you should instead try connecting through a local file called mysql.sock.

The place of the file (mysql.sock) depends on the mysql build/linux distro.

Regarding that file two things should be taken into account:
1. Know exactly where that file resides.
2. Make sure the rights on that bastard (I mean mysql.sock) are properly set. You should have a user/group "mysql" with rights on that file.

Now... if you can't connect to the database you can quickly check its status and (also important) the parameters.

You can do that with a command like:
ps -ef &#124; grep mysqld

if you get no result, then the server wasn't able to start.

If you get results, then you should have something like:
/usr/libexec/mysql/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysql/mysql.pid --skip-external-locking --port=3306 --socket=/var/run/mysql/mysql.sock

Option --port=3306 makes sure you can access the database from remote machines. Ofcourse you need firewall access and also most probably an username/password. Also in the cnf file you should comment out "bind-address = 127.0.0.1" which will make mysqld listen on localhost ONLY.

Option --socket=/var/run/mysql/mysql.sock tells you where is the socket located, and also tells you that this file connection mode is available.

In order 

P.S. After you set up the password on the database you can't connect to it without adding 2 parameters to the mysql client.

So, instead of using: mysql with no parameters try:
mysql -u root -p
then type the password.&lt;div class="comment-remix-meta"&gt;&lt;a href="#" class="replyto" onclick="replyto('4529','Programare Sociala'); return false;"&gt;Reply&lt;/a&gt;  - &lt;a href="#" class="quote" onclick="quote('4529','Programare Sociala','Bulshiiiiiiiiittttt!!!! :D\r\n\r\nWhen the application and the mysql database reside on the same machine, you can forget about connecting through network sockets (which is the equivalent of connecting to IP: 127.0.0.1) and you should instead try connecting through a local file called mysql.sock.\r\n\r\nThe place of the file (mysql.sock) depends on the mysql build\/linux distro.\r\n\r\nRegarding that file two things should be taken into account:\r\n1. Know exactly where that file resides.\r\n2. Make sure the rights on that bastard (I mean mysql.sock) are properly set. You should have a user\/group \&#34;mysql\&#34; with rights on that file.\r\n\r\nNow... if you can\'t connect to the database you can quickly check its status and (also important) the parameters.\r\n\r\nYou can do that with a command like:\r\nps -ef &#124; grep mysqld\r\n\r\nif you get no result, then the server wasn\'t able to start.\r\n\r\nIf you get results, then you should have something like:\r\n\/usr\/libexec\/mysql\/mysqld --basedir=\/usr --datadir=\/var\/lib\/mysql --user=mysql --pid-file=\/var\/run\/mysql\/mysql.pid --skip-external-locking --port=3306 --socket=\/var\/run\/mysql\/mysql.sock\r\n\r\nOption --port=3306 makes sure you can access the database from remote machines. Ofcourse you need firewall access and also most probably an username\/password. Also in the cnf file you should comment out \&#34;bind-address = 127.0.0.1\&#34; which will make mysqld listen on localhost ONLY.\r\n\r\nOption --socket=\/var\/run\/mysql\/mysql.sock tells you where is the socket located, and also tells you that this file connection mode is available.\r\n\r\nIn order \r\n\r\nP.S. After you set up the password on the database you can\'t connect to it without adding 2 parameters to the mysql client.\r\n\r\nSo, instead of using: mysql with no parameters try:\r\nmysql -u root -p\r\nthen type the password.'); return false;"&gt;Quote&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>Bulshiiiiiiiiittttt!!!! <img src='http://www.512kbps.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>When the application and the mysql database reside on the same machine, you can forget about connecting through network sockets (which is the equivalent of connecting to IP: 127.0.0.1) and you should instead try connecting through a local file called mysql.sock.</p>
<p>The place of the file (mysql.sock) depends on the mysql build/linux distro.</p>
<p>Regarding that file two things should be taken into account:<br />
1. Know exactly where that file resides.<br />
2. Make sure the rights on that bastard (I mean mysql.sock) are properly set. You should have a user/group &#8220;mysql&#8221; with rights on that file.</p>
<p>Now&#8230; if you can&#8217;t connect to the database you can quickly check its status and (also important) the parameters.</p>
<p>You can do that with a command like:<br />
ps -ef | grep mysqld</p>
<p>if you get no result, then the server wasn&#8217;t able to start.</p>
<p>If you get results, then you should have something like:<br />
/usr/libexec/mysql/mysqld &#8211;basedir=/usr &#8211;datadir=/var/lib/mysql &#8211;user=mysql &#8211;pid-file=/var/run/mysql/mysql.pid &#8211;skip-external-locking &#8211;port=3306 &#8211;socket=/var/run/mysql/mysql.sock</p>
<p>Option &#8211;port=3306 makes sure you can access the database from remote machines. Ofcourse you need firewall access and also most probably an username/password. Also in the cnf file you should comment out &#8220;bind-address = 127.0.0.1&#8243; which will make mysqld listen on localhost ONLY.</p>
<p>Option &#8211;socket=/var/run/mysql/mysql.sock tells you where is the socket located, and also tells you that this file connection mode is available.</p>
<p>In order </p>
<p>P.S. After you set up the password on the database you can&#8217;t connect to it without adding 2 parameters to the mysql client.</p>
<p>So, instead of using: mysql with no parameters try:<br />
mysql -u root -p<br />
then type the password.
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('4529','Programare Sociala'); return false;">Reply</a>  - <a href="#" class="quote" onclick="quote('4529','Programare Sociala','Bulshiiiiiiiiittttt!!!! :D\r\n\r\nWhen the application and the mysql database reside on the same machine, you can forget about connecting through network sockets (which is the equivalent of connecting to IP: 127.0.0.1) and you should instead try connecting through a local file called mysql.sock.\r\n\r\nThe place of the file (mysql.sock) depends on the mysql build\/linux distro.\r\n\r\nRegarding that file two things should be taken into account:\r\n1. Know exactly where that file resides.\r\n2. Make sure the rights on that bastard (I mean mysql.sock) are properly set. You should have a user\/group \&quot;mysql\&quot; with rights on that file.\r\n\r\nNow... if you can\'t connect to the database you can quickly check its status and (also important) the parameters.\r\n\r\nYou can do that with a command like:\r\nps -ef | grep mysqld\r\n\r\nif you get no result, then the server wasn\'t able to start.\r\n\r\nIf you get results, then you should have something like:\r\n\/usr\/libexec\/mysql\/mysqld --basedir=\/usr --datadir=\/var\/lib\/mysql --user=mysql --pid-file=\/var\/run\/mysql\/mysql.pid --skip-external-locking --port=3306 --socket=\/var\/run\/mysql\/mysql.sock\r\n\r\nOption --port=3306 makes sure you can access the database from remote machines. Ofcourse you need firewall access and also most probably an username\/password. Also in the cnf file you should comment out \&quot;bind-address = 127.0.0.1\&quot; which will make mysqld listen on localhost ONLY.\r\n\r\nOption --socket=\/var\/run\/mysql\/mysql.sock tells you where is the socket located, and also tells you that this file connection mode is available.\r\n\r\nIn order \r\n\r\nP.S. After you set up the password on the database you can\'t connect to it without adding 2 parameters to the mysql client.\r\n\r\nSo, instead of using: mysql with no parameters try:\r\nmysql -u root -p\r\nthen type the password.'); return false;">Quote</a></div>
]]></content:encoded>
	</item>
</channel>
</rss>
