I've just downloaded web2py 2.18.5 and set the MySQL URI as follows:
uri = 'mysql://rota:rota@localhost/rota'
Web2py gives:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
Traceback (most recent call last):
File "/home/kae/web2py-2.18.5/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "/home/kae/web2py-2.18.5/applications/rota/models/db.py"
<http://localhost:8000/admin/default/edit/rota/models/db.py>, line 47, in
<module>
check_reserved=['all'])
File "/home/kae/web2py-2.18.5/gluon/packages/dal/pydal/base.py", line 171, in
__call__
obj = super(MetaDAL, cls).__call__(*args, **kwargs)
File "/home/kae/web2py-2.18.5/gluon/packages/dal/pydal/base.py", line 477, in
__init__
"Failure to connect, tried %d times:\n%s" % (attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
File "/home/kae/web2py-2.18.5/gluon/packages/dal/pydal/base.py", line 442, in
__init__
self._dbname = REGEX_DBNAME.match(uri).group()
AttributeError: 'NoneType' object has no attribute 'group'
I can access the db from the command line:
$ mysql -h localhost -u rota -prota rota
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 187
Server version: 10.3.17-MariaDB-0+deb10u1 Debian 10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
MariaDB [rota]>
I can see Web2py can't connect to MySQL, but I can't find any clues as to
why.
Where should I look to try to resolve this?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/24964d5f-3d83-4b34-b802-90becf914eff%40googlegroups.com.