Forums

Mysql and Web2Py? Mysql.server not working

Hi

Trying to move a website here. Got the files transfered and got the databases loaded into Mysql. Now I try to access the database, but the guide and by searching the forum I just get that I should use mysql.server as domain. But that does not work for Web2py

This is how I am trying:

db = DAL('mysql://dominochinese:pass@mysql.server',pool_size=1,check_reserved=['all'])

any ideas on what is going wrong? This is the error I get:

<type 'exceptions.SyntaxError'> Invalid URI string in DAL: mysql://dominochinese:mypass@mysql.server

Cheers

I think you need to specify the database name as well, eg.

db = DAL('mysql://dominochinese:pass@mysql.server/dominochinese$adatabase',pool_size=1,check_reserved=['all'])