-2
What must be happening, is that you must be trying to connect in the following way:
mysql -u usuario -p senha -h localhost database_name
The right thing would be:
/Applications/MAMP/Library/bin/mysql --host=localhost -u usuario -p senha
So you pull the MAMP instance and not the local one (probably you have installed mysql locally)
Or it may be the other way around, you are connecting in the instance with the Workbench, and by the terminal in MAMP.
More alternatives:
Swap Mysql port on MAMP, and connect as follows:
mysql --host=localhost --port=9999 mysql -u root -p
Check the port of your instance and see if it is the one of MAMP:
mysql> SHOW GLOBAL VARIABLES LIKE 'PORT';
Post as you are trying to connect, and the error displayed.
– rbz
For starters, I’m a beginner and I’m taking a comic book course. I built a server on my machine through MAMP and then created the database through Workbench. Now I’m trying to work through the terminal. I installed Mysql but I can’t work in the same BD created by Workbench.
– Julio Barreto
Tranquil Julio ! I think I know what it is, so I’ll post the answer to go with.
– rbz