The error is clear: Unknown database 'postcodes2'

did you create the database?

On May 24, 4:52 am, peter <[email protected]> wrote:
> I get this error message when trying to connect to an MYSQL database
>
>     dbp = DAL('mysql://admin:password@localhost:3306/postcodes2')
>  File "/opt/web-apps/web2py/gluon/dal.py", line 3720, in __init__
> raise
> RuntimeError, "Failure to connect, tried 5 times:\n%s" %
> errorRuntimeError:
> Failure to connect, tried 5 times:
> (1049, u"Unknown database 'postcodes2'")
>
> I get the error with or without the port number.
> I can telnet to port 3306.
>
> If I change the password to an incorrect one, it gives a different
> error, so it connecting to the host.
> If I use mysql at the command line it shows this database as present.
>
> Does anyone have any ideas?
> Thanks

Reply via email to