#25917 closed defect (invalid)
Mysql5 Path
Reported by: | oldmilwaukee33@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.1 |
Keywords: | Cc: | ||
Port: | mysql5 |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
When I run python manage.py dbshell
I am getting an error message regarding mysql5 not being in my path. I have tried a few things in my settings.py file but I must be setting the path incorrectly. I want to find the correct path to mysql5 & set it in my bash_login file. This should allow mysql5 to be found @localhost in my settings.py file & also have mysql5 in my system path.....
demetrius-fords-macbook-pro-17:jenniwren demet8$ python manage.py dbshell /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet Error: You appear not to have the 'mysql' program installed or on your path.
Change History (9)
comment:1 Changed 14 years ago by mf2k (Frank Schima)
Description: | modified (diff) |
---|---|
Keywords: | Mysql5 Path removed |
Milestone: | MacPorts 1.9.2 |
Owner: | changed from macports-tickets@… to ryandesign@… |
Port: | mysql5 added |
Type: | request → defect |
comment:2 follow-up: 3 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
comment:3 Changed 14 years ago by oldmilwaukee33@…
Replying to ryandesign@…:
From the error message it appears to be looking for "mysql" rather than "mysql5". "mysql" is located in /opt/local/lib/mysql5/bin; put that in your PATH.
It worked! thank you. For some reason I couldn't get this answer on StackOverflow......
comment:4 follow-up: 5 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Glad you got it working.
comment:5 Changed 14 years ago by oldmilwaukee33@…
Hey Ryan quick question. Everything was working fine with my Mysql connection until yesterday. This is the error message I am getting now when I try to login to the server mysql5 -u demet8 -p:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/local/var/run/mysql5/mysqld.sock' (2).
This is my current path via bash_login: export PATH="opt/local/bin:/opt/local/bin/mysql5/bin:/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin:/opt/local/bin:/usr/local/bin:/usr/local/sbin:$PATH"
I updated Macports and my Portfiles after I started getting the error message & the update when good but I am still getting the ERROR message. Any suggestions?
comment:6 follow-up: 7 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Is mysqld actually running, and does its socket file exist at /opt/local/var/run/mysql5/mysqld.sock?
comment:7 Changed 14 years ago by oldmilwaukee33@…
I downloaded mysqld sometime ago & it was running fine. I looked in /opt/local/var/run/mysql5/mysqld.sock? & the mysql5 folder is completely empty. No files of any kind are located in the mysql5 folder.....
comment:8 follow-up: 9 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Ok, so there is no socket file. Is mysqld running? If not, start it; if it's already running, stop and restart it. Do you have a socket file there now? If not, do you have the socket file somewhere else? Perhaps you told MySQL to put the socket elsewhere by changing a setting in your my.cnf?
comment:9 Changed 14 years ago by oldmilwaukee33@…
@ Ryan this is what I did. sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock. I had to add a symbolic link to mysql5 mysqld.sock. Then I re-started mysql. It worked before without all this so I am not sure what really happened. Thanks again for helping me.
From the error message it appears to be looking for "mysql" rather than "mysql5". "mysql" is located in /opt/local/lib/mysql5/bin; put that in your PATH.