I am simply following this example https://www.w3schools.com/python/python_mysql_create_db.asp
using this code
import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
user="yourusername",
passwd="yourpassword"
)
I leave localhost unchanged, but set the user/pass to be my personal user/password I use to log into the computer. I am getting
mysql.connector.errors.DatabaseError: 2003 (HY000): Can't connect to MySQL server on 'localhost' (61)
but am surprised to find no clear explanation as to why online. It seems like such a simple line of code... I don't know what I'm doing wrong. What am I doing wrong?