ssh into SynoNAS, sql.connector installed, MariaDB10 is running can be accessed by root query tables in command line.
but via python:
I check also :
seems mysql is running on 0.0.0.0 not 127.0.01 for loopback?
if so , how to set?
thanks for any thoughts.
but via python:
got following error:>> import mysql.connector
>> cnx = mysql.connector.connect(user='root', password='xxxxxx', host='127.0.0.1', database='mysql')
Traceback (most recent call last):
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/mysql/connector/connection_cext.py", line 179, in _open_connection
self._cmysql.connect(**cnx_kwargs)
_mysql_connector.MySQLInterfaceError: Can't connect to MySQL server on '127.0.0.1' (111)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/mysql/connector/init.py", line 172, in connect
return CMySQLConnection(*args, **kwargs)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/mysql/connector/connection_cext.py", line 78, in init
self.connect(**kwargs)
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/mysql/connector/abstracts.py", line 736, in connect
self._open_connection()
File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/mysql/connector/connection_cext.py", line 182, in _open_connection
sqlstate=exc.sqlstate)
mysql.connector.errors.DatabaseError: 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)
I check also :
$ sudo netstat -plutn |grep -i sql
tcp 0 0 0.0.0.0:3307 0.0.0.0:* LISTEN 14228/mysqld
seems mysql is running on 0.0.0.0 not 127.0.01 for loopback?
if so , how to set?
thanks for any thoughts.