Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't connect to local MySQL server through socket '/opt/local/var/run/mysql55/mysqld.sock' (2)
    primarykey
    data
    text
    <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/758819/python-mysqldb-connection-problems">Python: MySQLdb Connection Problems</a> </p> </blockquote> <p>MySQL Server running ok, but my python not connect in mysql with MySQL-python lib, why?</p> <pre><code>$ port installed mysql55 @5.5.27_0 (active) mysql55-server @5.5.27_0 (active) mysql_select @0.1.2_0 (active) </code></pre> <p>Show Tables OK...</p> <pre><code>$ mysql -uroot -Dtest mysql&gt; SHOW TABLES; Empty set (0.00 sec) </code></pre> <p>My python installed</p> <pre><code>$ pip freeze Django==1.4.1 MySQL-python==1.2.4b2 </code></pre> <p>Why? </p> <pre><code>$ python Python 2.7.3 (default, Jul 30 2012, 16:41:43) [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.57))] on darwin Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import MySQLdb &gt;&gt;&gt; db = MySQLdb.connect(host="localhost", port=3306, user="root", passwd="", db="test") Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File "build/bdist.macosx-10.7-x86_64/egg/MySQLdb/__init__.py", line 81, in Connect File "build/bdist.macosx-10.7-x86_64/egg/MySQLdb/connections.py", line 187, in __init__ _mysql_exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/opt/local/var/run/mysql55/mysqld.sock' (2)") $ ll /opt/local/var/run/mysql55/mysqld.sock ls: /opt/local/var/run/mysql55/mysqld.sock: No such file or directory </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload