Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #691 (closed defect: invalid)

Opened 13 years ago

Last modified 12 years ago

I want to use turbogears to access a database which has no password.

Reported by: anonymous Owned by: anonymous
Priority: high Milestone:
Component: SQLObject Version: 0.8
Severity: major Keywords: MySQL .connect password
Cc:

Description

When using tg-admin sql create with sqlobject.dburi="mysql://user:""@host:8080/databasename" in dev.cfg I see something like this:

Traceback (most recent call last):

File "/home/utils/TurboGears-0.8.9/tg-admin", line 7, in ?

sys.exit(

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/TurboGears-0.8.9-py2.4.egg/turbogears/command/init.py", line 186, in main

command.run()

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/TurboGears-0.8.9-py2.4.egg/turbogears/command/init.py", line 106, in run

command.the_runner.run(sys.argv)

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/manager/command.py", line 102, in run

runner.run()

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/manager/command.py", line 233, in run

self.command()

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/manager/command.py", line 550, in command

exists = soClass._connection.tableExists(soClass.sqlmeta.table)

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/mysql/mysqlconnection.py", line 108, in tableExists

for (table,) in self.queryAll('SHOW TABLES'):

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/dbconnection.py", line 316, in queryAll

return self._runWithConnection(self._queryAll, s)

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/dbconnection.py", line 215, in _runWithConnection

conn = self.getConnection()

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/dbconnection.py", line 226, in getConnection

conn = self.makeConnection()

File "/home/utils/Python-2.4.1/lib/python2.4/site-packages/SQLObject-0.7.1dev_r1457-py2.4.egg/sqlobject/mysql/mysqlconnection.py", line 43, in makeConnection

raise self.module.OperationalError?(

_mysql_exceptions.OperationalError?: (2003, "Can't connect to MySQL server on 'host' (111)"); used connection string: host=host, port=8080, db=database, user=user, pwd=

I am not able to remove this error. All paths and libraries seem to be correctly installed. I am able to connect to the database from the command prompt. Also I am able to use the MySQLdb.connect in other scripts without fail.

Please advice

Change History

comment:1 Changed 13 years ago by kevin

Have you tried mysql://user@host:8080/databasename

as the dburi?

(And I hope that 8080 is not literal... 8080 is not the typical mysql port, but rather a typical web server port...)

comment:2 Changed 13 years ago by godoy

  • Status changed from new to closed
  • Resolution set to invalid

I'm closing this as this was already clarified at the SQLObject mailing list and confirmed by other users there. If the reporter still can't make it to work, please reopen this bug.

I'm closing as "invalid", since there never was a problem here.

Note: See TracTickets for help on using tickets.