Setting the MySQL root password in mamp

Source: Internet
Author: User
Tags learn php

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.