Hi,

I am using ngnix+fcgi with web2py. Just today I switched the database
from SQLite to MySQL. But it seems web2py failed to connect to mysql
if using fcgi+ngnix. Launch it by "python web2py.py" works fine.

The error looks like this:

Error traceback
Traceback (most recent call last):
  File "/home/zhe/web2py/gluon/restricted.py", line 178, in restricted
    exec ccode in environment
  File "/home/zhe/web2py/applications/init/models/db.py", line 16, in
<module>
    db = DAL('mysql://web2py:lindge1...@localhost/lab')
  File "/home/zhe/web2py/gluon/sql.py", line 3887, in DAL
    raise RuntimeError, "Failure to connect to DB. Tried 5 times"
RuntimeError: Failure to connect to DB. Tried 5 times

Could anyone tell me what to do? Thanks!

Cheers,
Zhe

Reply via email to