Mamp

Basics

$PATH

Ensure that the path starts with MAMP otherwise you will pickup other MySql(s).

jn9ky0j-msd:tmp admin$ echo $PATH
/Applications/MAMP/Library/bin/:/Applications/MAMP/bin/php5.3/bin/

MySql

jn9ky0j-msd:bin admin$ which mysql
/Applications/MAMP/Library/bin//mysql

MySql root login problems

This occurs several times in several places:

jn9ky0j-msd:bin admin$ !grep
grep root *
checkMysql.sh:/Applications/MAMP/Library/bin/mysqlcheck --all-databases --check --check-upgrade -u root -ppassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock
quickCheckMysqlUpgrade.sh:/Applications/MAMP/Library/bin/mysqlcheck --quick --check-upgrade -u root -ppassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock mysql
repairMysql.sh:/Applications/MAMP/Library/bin/mysqlcheck --all-databases --check --repair -u root -ppassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock
stopMysql.sh:/Applications/MAMP/Library/bin/mysqladmin -u root -ppassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock shutdown
upgradeMysql.sh:/Applications/MAMP/Library/bin/mysql_upgrade -u root -ppassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock --force

Change all root passwords to the MySql root password

PHP

(!) Note: you need to chmod 755 /Applications/MAMP/bin/php5.3/bin//php so which can find it.

jn9ky0j-msd:bin admin$ which php
/Applications/MAMP/bin/php5.3/bin//php

phpMyAdmin

Access denied for user 'root'@'localhost' (using password: YES)

Solution is to go to /Applications/MAMP/bin/phpMyAdmin and edit the config.inc.php file to set the MySql root password

Cannot connect to MySql server

Then I checked the index.php file under the /MAMP/bin/mamp/ folder, and found that it hard coded the msyql connection username/password as root/root. If you changed the default root password (of course for security), you can modify the code in index.php to test MAMP.

MySql

Note that is MAMP Mysql (/Applications/MAMP/Library/bin//mysql) which is different from /usr/bin/mysql

mysql -h 127.0.0.1 -u root —port=8889 -p (where password is 'MuS1c4')

See [http://localhost:8888/MAMP/?language=English] for useful details

Mysqlcheck

Edit /Applications/MAMP/bin/quickCheckMysqlUpgrade.sh and edit root password

Start Page

See [http://localhost:8888/MAMP/?language=English] for useful details


Files

ApacheoniMac(MAMP).pdf
MAMP.pdf

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License