此代码适用于 mysql。但是 Mysql 在我的笔记本电脑上不起作用,所以我选择了 mariadb 。有人可以帮我吗
我还安装了 MariaDB 连接器/Python 但没有用...
try :
conn = sql.connect(host = 'localhost', user = 'root', passwd = 'darknessroot')
if conn.is_connected:
print('Connection......OK......')
else:
print('Connection......NOT OK......')
except:
print('ERROR.... CHECK CONNECTION')```