Reputation: 1
I'm using a Macbook Pro. I tried to setup for PHP. The server I'm using is MAMP. After I start MAMP, I can run localhost/phpmyadmin and MySQLWorkbench. But when I try to run mysql through Terminal, I can't connect to my database. I had to disconnect MAMP in order to access my database through Terminal. Then when I restart MAMP, it just connect to Apache Server instead of both Apache and MySQL Server. I figure the port is not 3306 when I run mysql through Terminal. I wonder if I could change the port to 3306 so I can make change to the database I make in the terminal with phpmyadmin. I searched the Internet but couldn't find a solution.
Just now, I couldn't run mysql in terminal. I'm so frustrated. Can somebody help?
Update: I just found out Macbook comes with built-in Apache and Mysql Server. I followed the instruction from below website to set it up and it works. Hope this can help those who has the same problem.
https://coolestguidesontheplanet.com/get-apache-mysql-php-and-phpmyadmin-working-on-macos-sierra/
Upvotes: 0
Views: 937
Reputation: 125
Maybe... I had the same problem with 2 versions of php (2 differents locations on disk). phpinfo() saw a version, the terminal saw another. The solution: change the $ PATH environment variable. Hope this helps...
Upvotes: 0