My understanding is that when I downloaded MAMP that mysql would've been automatically downloaded as well.
I have changed the PATH in the bash_profile to "Applications/MAMP/Library/bin" and then I tested the command "mysql --version", which works perfectly, but then I tried to run "mysql.server start" it prompted "mysql.server command not found" (sudo mysql.server results the same thing). I'm confused because obviously that mysql is found, otherwise "mysql --version" wouldn't work. Please help me figure this out, thanks!
My final goal is to be able to access my database on Jupyter Notebook.
%load_ext sql
no error;%sql mysql+mysqldb://myusername:fakepassword@localhost/company
gives(MySQLdb._exceptions.OperationalError) (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")
Given the error above, I tried the following method to connect and resulted error as well:
import mysql.connector
db = mysql.connector.connect(
host='localhost',
user='myusername',
passwd='fakepassword')
Error 2003 (HY000): Can't connect to MySQL server on 'localhost' (61)
Thanks in advance!