uri = 'mysql://rota:rota@localhost/rota'
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", 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'
$ mysql -h localhost -u rota -prota rotaWelcome to the MariaDB monitor. Commands end with ; or \g.Your MariaDB connection id is 187Server 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]>mysql://username:password@localhost/test?set_encoding=utf8mb4mysql://username:password@localhost:13306/test?set_encoding=utf8mb4MySQL is listening on the default port:
$ telnet localhost 3306Trying ::1...Trying 127.0.0.1...Connected to localhost.Escape character is '^]'.c5.5.5-10.3.17-MariaDB-0+deb10u1�a3y(W]OS��-��5KZaY|$920;vmysql_native_password^CConnection closed by foreign host.uri = configuration.get('db.uri')
print uri
db = DAL(uri)'mysql://rota:rota@localhost/rota?set_encoding=utf8mb4'
db = DAL('mysql://rota:rota@localhost/rota?set_encoding=utf8mb4')