No password assigned during MySQL install
Hello, I just installed MYSQL and the Python MySQL connector on my Mac OSX Pro. The installations appeared to have proceeded smoothly. During the install I was not prompted to enter a MySQL password. How do I determine what my password is? Is there a default password? I am attempting to use the Python mysql connector but am receiving an error message and I am wondering if it is because I do not know what password to enter. Here is my code and associated error message.
>>> import mysql.connector
>> conn = mysql.connector.connect(host='localhost', user='root', passwd='python')
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
conn = mysql.connector.connect(host='localhost', user='root', passwd='python')
File "/Library/Python/2.7/site-packages/mysql/connector/__init__.py", line 98, in connect
return MySQLConnection(*args, **kwargs)
File "/Library/Python/2.7/site-packages/mysql/connector/connection.py", line 118, in __init__
File "/Library/Python/2.7/site-packages/mysql/connector/connection.py", line 382, in connect
File "/Library/Python/2.7/site-packages/mysql/connector/connection.py", line 345, in _open_connection
File "/Library/Python/2.7/site-packages/mysql/connector/network.py", line 386, in open_connection
errno=2003, values=(self.get_address(), _strioerror(err)))
InterfaceError: 2003: Can't connect to MySQL server on 'localhost:3306' (61 Connection refused)
I am using the Programming Python text by Mark Lutz as my guide / text and the code I am copying used python as the password. If anybody could help me understand how to make the MySQL connection work properly I would appreciate it. I am just guessing that my problem is an incorrect password.