```
def create_server_connection(host_name, user_name, user_password):
    connection = None
    try:
        connection = mysql.connector.connect(
            host = host_name,
            user = user_name,
            passwd = user_password
        )
        print("database connection successfully completed")
    except Error as err:
        print(f"Error: '{err}'")
    return connection

pw = ""
connection = create_server_connection("localhost", "root", pw)

```

I am setting up a connection from Jupyter Notebook to MySQL. I'm using localhost and the root user, which has no password. I got this error message below:

Error: '1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)'

Could anyone help? Thanks.