MySQL from the Command Line (terminal) in MAMP PRO

To get to the command line for MySQL for MAMP or MAMP PRO just open up you terminal and enter the following:

/Applications/MAMP/Library/bin/mysql –host=localhost -uroot -proot

You can see all the databases by using the following command:

mysql command line command show databases

If you type the MySQL command : USE <table name>  you can then start using that particular database.

Another convenient command is SHOW TABLES. Can you figure out what that does?

Now you can type MySQL commands right from the command line.


Leave a Reply

Your email address will not be published. Required fields are marked *