<?xml version="1.0"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>DIYMacServer &#187; Topic: Can&#039;t connect to MySQL server on &#039;127.0.0.1&#039; (61)</title>
<link>http://diymacserver.com/forum/</link>
<description>DIYMacServer &#187; Topic: Can&#039;t connect to MySQL server on &#039;127.0.0.1&#039; (61)</description>
<language>en</language>
<pubDate>Wed, 08 Feb 2012 19:08:07 +0000</pubDate>

<item>
<title>Richard on "Can&#039;t connect to MySQL server on &#039;127.0.0.1&#039; (61)"</title>
<link>http://diymacserver.com/forum/topic/cant-connect-to-mysql-server-on-127001-61#post-484</link>
<pubDate>Sat, 31 May 2008 09:58:11 +0000</pubDate>
<dc:creator>Richard</dc:creator>
<guid isPermaLink="false">484@http://diymacserver.com/forum/</guid>
<description>&#60;p&#62;Thanks will do that.
&#60;/p&#62;</description>
</item>
<item>
<title>Rimas on "Can&#039;t connect to MySQL server on &#039;127.0.0.1&#039; (61)"</title>
<link>http://diymacserver.com/forum/topic/cant-connect-to-mysql-server-on-127001-61#post-480</link>
<pubDate>Fri, 30 May 2008 20:30:04 +0000</pubDate>
<dc:creator>Rimas</dc:creator>
<guid isPermaLink="false">480@http://diymacserver.com/forum/</guid>
<description>&#60;p&#62;Hi...  OK, adding e-mail capability to the domain that I am hosting on my Mac Mini server is obviously not a high priority, so don't worry about the delay in responding.  Just to close out this dangling thread, using sockets as suggested did in fact solve this problem when I finally got back to it the other day...&#60;/p&#62;
&#60;p&#62;If I may, I would like to suggest that you update your wonderful documentation to say that if you add &#34;skip-networking&#34; to your /etc/my.cnf as suggested in the instructions for &#34;Securing your MySQL install&#34;, that you will need to use sockets in the mysql_virtual_xxxxxxx_maps.cf files when &#34;Configuring Postfix for virtual domains using MySQL&#34;.&#60;/p&#62;
&#60;p&#62;Cheers,&#60;/p&#62;
&#60;p&#62;Rimas
&#60;/p&#62;</description>
</item>
<item>
<title>Richard on "Can&#039;t connect to MySQL server on &#039;127.0.0.1&#039; (61)"</title>
<link>http://diymacserver.com/forum/topic/cant-connect-to-mysql-server-on-127001-61#post-447</link>
<pubDate>Sun, 16 Mar 2008 11:06:19 +0000</pubDate>
<dc:creator>Richard</dc:creator>
<guid isPermaLink="false">447@http://diymacserver.com/forum/</guid>
<description>&#60;p&#62;Ok, sorry for the late reply but I was out of the country for work...&#60;/p&#62;
&#60;p&#62;Do you have a firewall enabled ? Can you tell me which version of OS X you are running ?&#60;/p&#62;
&#60;p&#62;Can you try using sockets ?&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;
user = mailsrvr
password = ********
hosts = unix:/tmp/mysql.sock
dbname = postfix
&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Make sure that your socket file is in the same place, you can use the command &#34;mysql_config&#34; to see where our socket file is.
&#60;/p&#62;</description>
</item>
<item>
<title>Rimas on "Can&#039;t connect to MySQL server on &#039;127.0.0.1&#039; (61)"</title>
<link>http://diymacserver.com/forum/topic/cant-connect-to-mysql-server-on-127001-61#post-446</link>
<pubDate>Wed, 12 Mar 2008 21:51:41 +0000</pubDate>
<dc:creator>Rimas</dc:creator>
<guid isPermaLink="false">446@http://diymacserver.com/forum/</guid>
<description>&#60;p&#62;Hi!&#60;/p&#62;
&#60;p&#62;What an excellent source of information this web site is...!!!  I got MySQL, Apache and PHP all successfully working. However, I am struggling to get even a basic mail server up and running.  After building, installing, configuring and starting all of the required pieces, I find that I am unable to send or receive e-mail.  Looking in /var/log/mail.log I see the same pattern of messages repreated every 60 seconds or so:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
Mar 12 16:00:10 MacMiniServer postfix/trivial-rewrite[584]: warning: connect to mysql server 127.0.0.1: Can't connect to MySQL server on '127.0.0.1' (61)&#60;br /&#62;
Mar 12 16:00:10 MacMiniServer postfix/trivial-rewrite[584]: fatal: mysql:/etc/postfix/mysql_virtual_alias_maps.cf(0,lock&#124;fold_fix): table lookup problem&#60;br /&#62;
Mar 12 16:00:11 MacMiniServer postfix/smtpd[488]: warning: problem talking to service rewrite: Unknown error: 0&#60;br /&#62;
Mar 12 16:00:11 MacMiniServer postfix/smtpd[347]: warning: problem talking to service rewrite: Unknown error: 0&#60;br /&#62;
Mar 12 16:00:11 MacMiniServer postfix/master[286]: warning: process /usr/libexec/postfix/trivial-rewrite pid 584 exit status 1&#60;br /&#62;
Mar 12 16:00:11 MacMiniServer postfix/master[286]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I am able to connect to MySQL from a cmd line:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
MacMiniServer:~ Rimas$ mysql --user=Rimas --password=********&#60;br /&#62;
Welcome to the MySQL monitor.  Commands end with ; or \g.&#60;br /&#62;
Your MySQL connection id is 67&#60;br /&#62;
Server version: 5.0.51a-standard-log Source distribution&#60;/p&#62;
&#60;p&#62;Type 'help;' or '\h' for help. Type '\c' to clear the buffer.&#60;/p&#62;
&#60;p&#62;mysql&#38;gt; use mysql&#60;br /&#62;
Database changed&#60;br /&#62;
mysql&#38;gt; select host, user, password, select_priv from user;&#60;br /&#62;
+---------------------+-----------+-------------------------------------------+-------------+&#60;br /&#62;
&#124; host                &#124; user      &#124; password                                  &#124; select_priv &#124;&#60;br /&#62;
+---------------------+-----------+-------------------------------------------+-------------+&#60;br /&#62;
&#124; localhost           &#124; Rimas     &#124; *972D8E7C521419D7E52E96B357E80789D622948D &#124; Y           &#124;&#60;br /&#62;
&#124; MacMiniServer.local &#124; Rimas     &#124; *972D8E7C521419D7E52E96B357E80789D622948D &#124; Y           &#124;&#60;br /&#62;
&#124; 127.0.0.1           &#124; Rimas     &#124; *972D8E7C521419D7E52E96B357E80789D622948D &#124; Y           &#124;&#60;br /&#62;
&#124; localhost           &#124; mailsrvr  &#124; *972D8E7C521419D7E52E96B357E80789D622948D &#124; N           &#124;&#60;br /&#62;
&#124; localhost           &#124; mailadmin &#124; *972D8E7C521419D7E52E96B357E80789D622948D &#124; N           &#124;&#60;br /&#62;
+---------------------+-----------+-------------------------------------------+-------------+&#60;br /&#62;
5 rows in set (0.00 sec)&#60;/p&#62;
&#60;p&#62;mysql&#38;gt; select host, db, user, select_priv from db;&#60;br /&#62;
+-----------+---------+-----------+-------------+&#60;br /&#62;
&#124; host      &#124; db      &#124; user      &#124; select_priv &#124;&#60;br /&#62;
+-----------+---------+-----------+-------------+&#60;br /&#62;
&#124; localhost &#124; postfix &#124; mailsrvr  &#124; Y           &#124;&#60;br /&#62;
&#124; localhost &#124; postfix &#124; mailadmin &#124; Y           &#124;&#60;br /&#62;
+-----------+---------+-----------+-------------+&#60;br /&#62;
2 rows in set (0.00 sec)&#60;/p&#62;
&#60;p&#62;mysql&#38;gt; exit&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Just to make sure it was a problem connecting to MySQL, I edited /etc/postfix/main.cf and changed&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;to&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
virtual_alias_maps = ********.org&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;and after restarting Postfix the can't connect to MySQL error moved to the next item (i.e. mysql_virtual_domains_maps.cf).&#60;/p&#62;
&#60;p&#62;If it helps, my mysql_virtual_domains_maps.cf looks like this:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
MacMiniServer:~ Rimas$ cat /etc/postfix/mysql_virtual_alias_maps.cf&#60;br /&#62;
user = mailsrvr&#60;br /&#62;
password = ********&#60;br /&#62;
hosts = 127.0.0.1&#60;br /&#62;
dbname = postfix&#60;br /&#62;
query = SELECT goto FROM alias WHERE address='%s' AND active = 1&#60;br /&#62;
MacMiniServer:~ Rimas$&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I have tried changing user = mailsrvr to user = Rimas, and also hosts = 127.0.0.1 to hosts = localhost but to no avail.  At this point I feel like I am kinda stuck and am hoping that I am just missing something really obvious.&#60;/p&#62;
&#60;p&#62;Thanks,&#60;/p&#62;
&#60;p&#62;Rimas
&#60;/p&#62;</description>
</item>

</channel>
</rss>

