As a junior student, my technology is still weak, recently want to learn php+mysql for web development, because of the use of Mac machine, and want to quickly get started without the time spent in the environment, I chose to use the Mamp integrated development environment, I will slowly will my learning experience and share with you, Hope to the guidance of everyone.
Download mamp.dmg file after clicking Install, because no difficulty will not repeat, but there is a pit in the process, that is, in the standard installation installation This step, select Custom, and then select Mamp Normal version. Because it has mamp and Mamp Pro in its installation package, he will install the Pro version by default, and then let you purchase this version, and there will always be a warning message when you start the free version later.
This article is mainly about modifying the root password of MySQL.
1.cd/application/mamp/library/bin/
2../mysqladmin-u root-p Password "NewPassword"
Then you will be asked to enter your current password: root
But after changing the password, then start Mamp will be error, because at this time mamp do not know your MySQL roor password.
The following main talk about how to update the password configuration.
Many articles will tell you to update/application/mamp/bin/mamp/index.php in this line
$link =mysql_connect (':/application/mamp/tmp/mysql/mysql.sock ', ' root ', ' root ');
To change the second root to a new password, but I found that the new version Mamp in index.php has become
$link = mysql_connect (
':/applications/mamp/tmp/mysql/mysql.sock ',
' <?php echo $cfg [' Servers '][1][' user '];?> ',
' <?php echo $cfg [' Servers '][1][' password '];?> '
);
So in fact this file does not need to be modified.
Only need to modify/application/mamp/bin/phpadmin/config.inc.php
and-proot in the following five files to-p+ a new password
/application/mamp/bin/checkmysql.sh
/application/mamp/bin/quickcheckmysqlupgrade.sh
/application/mamp/bin/repairmysql.sh
/application/mamp/bin/stopmysql.sh
/application/mamp/bin/upgrademysql.sh
Just start to learn, write things also have no technical content, just want to share the process of learning with you, also hope that this can let me learn more solid.
Setting the MySQL root password in mamp