I'm seeking assistance in troubleshooting connecting to MySQL (4.0.20)
using Python (2.3.4) and MySQLdb (1.0.0). When I attempt to make a
connection, I get the following exception:
_mysql_exceptions.InternalError: (-1, 'server not initialized')
The database is definitely running as I can connect to it using the
mysql client. Also, when I attempt to connect to MySQL from within
Python, I don't see any messages in the MySQL logs (ie the .log and .err
files in /usr/local/mysql/data/).
Does anyone have any advice or suggestions as to how to figure out
what's going wrong? Also, if there's a better forum for posting this
question, please point me in the right direction.
Thanks!
Dan
[baggott2@goingto baggott2]$ python
Python 2.3.4 (#1, Jul 26 2004, 15:14:49)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-34)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import MySQLdb
c = MySQLdb.connect(host='localhost',user='gbd',passwd ='xxxxxxx',db='zinc')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/site-packages/MySQLdb/__init__.py",
line 64, in Connect
return apply(Connection, args, kwargs)
File "/usr/local/lib/python2.3/site-packages/MySQLdb/connections.py",
line 116, in __init__
self._make_connection(args, kwargs2)
File "/usr/local/lib/python2.3/site-packages/MySQLdb/connections.py",
line 41, in _make_connection
apply(super(ConnectionBase, self).__init__, args, kwargs)
_mysql_exceptions.InternalError: (-1, 'server not initialized')
[baggott2@goingto baggott2]$ mysql -h localhost -u gbd -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9 to server version: 4.0.20-standard-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+----------+
| Database |
+----------+
| zinc |
+----------+
1 row in set (0.00 sec)
mysql> Bye
[baggott2@goingto baggott2]$