Mysql on nas (python) [SOLVED]
Posted by: Stephen Feyrer
Date: March 23, 2012 07:44AM
I have a MySQL server running on my nas and I am struggling to connect to it from a terminal session on the nas. Also I can't connect through Python's Py-MySQL package. I know the server's there but I don't know how to connect to it from within the machine that its running on. I can connect from a terminal on my desktop PC and through a web interface.
-sh: mysql: command not found
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/__init__.py", line 23, in <module>
ImportError: this is MySQLdb version (1, 2, 3, 'final', 0), but _mysql is version (1, 2, 3, 'gamma', 1)
# /mnt/HDA_ROOT/mysql/bin/mysql -u root -p
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1555 to server version: 5.0.27-log
No entry for terminal type "xterm";
using dumb terminal settings.
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
I've tried including the /mnt/HDA_ROOT/mysql/lib path in the ld.so.conf but that hasn't helped.
The nas is a Qnap tsx09 and python is installed as optware.
I would like to get python talking to the Mysql server. Any thoughts or advice would be very much appreciated.
Edited 1 time(s). Last edit at 03/25/2012 09:01AM by Stephen Feyrer.