I have a collection of python scripts which allow mysql querying of my cvs repository via the viewcvs web front end. Ultimately, I'm receiving a 'No database selected error' from mysql. However, I know the database exists, and can confirm it with mysql show. The problem seems to have originated from the viewcvs python scripts--perhaps the viewcvs query.py script isn't properly obtaining the database name from the viewcvs configuration file? Anyone know what else could possibly be wrong--maybe problem is indeed with mysqldb?
Here is the traceback:
Traceback (most recent call last):
File "/usr/local/viewcvs-1.0-dev/lib/query.py", line 397, in main
commits = run_query(server, form_data, viewcvs_link)
File "/usr/local/viewcvs-1.0-dev/lib/query.py", line 354, in run_query
db.RunQuery(query)
File "/usr/local/viewcvs-1.0-dev/lib/cvsdb.py", line 394, in RunQuery
cursor.execute(sql)
File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 137, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 33, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1046, 'No database selected')
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It may exist, but you haven't selected it. Usually the database is specified when opening the connection. I don't really know about the viewcvs configuration for MySQL, but you should at that some more.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have a collection of python scripts which allow mysql querying of my cvs repository via the viewcvs web front end. Ultimately, I'm receiving a 'No database selected error' from mysql. However, I know the database exists, and can confirm it with mysql show. The problem seems to have originated from the viewcvs python scripts--perhaps the viewcvs query.py script isn't properly obtaining the database name from the viewcvs configuration file? Anyone know what else could possibly be wrong--maybe problem is indeed with mysqldb?
Here is the traceback:
Traceback (most recent call last):
File "/usr/local/viewcvs-1.0-dev/lib/query.py", line 397, in main
commits = run_query(server, form_data, viewcvs_link)
File "/usr/local/viewcvs-1.0-dev/lib/query.py", line 354, in run_query
db.RunQuery(query)
File "/usr/local/viewcvs-1.0-dev/lib/cvsdb.py", line 394, in RunQuery
cursor.execute(sql)
File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 137, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 33, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1046, 'No database selected')
It may exist, but you haven't selected it. Usually the database is specified when opening the connection. I don't really know about the viewcvs configuration for MySQL, but you should at that some more.