Edit : My database is now connected I uninstalled and reinstalled the mysql-connector using anaconda prompt
Previously it was Bad Handshake
and then later ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
i reinstalled a different version of sql and now it says
AttributeError: module 'mysql.connector' has no attribute 'connect'
The firewall of your server may not be turned off
1.1 If it is CentOS 7, you can use systemctl stop firewalld to temporarily turn off the firewall to solve the problem
Have you authorized a mysql user who can log in remotely
2.1 You can also use the authorization statement grant all on . to "USERNAME"@"%" identified by "PASSWORD" in mysql

希望你能看懂，我也不知道这个翻译准确不准确，祝你好运
I'm having different errors while trying to connect python to mysql