Home > Backend Development > PHP Tutorial > mysql change password change mysql password for MAMP

mysql change password change mysql password for MAMP

WBOY
Release: 2016-07-28 08:30:20
Original
3556 people have browsed it

MAMP is a commonly used PHP integrated environment under OS X system. How to change the password for MAMP to log in to mysql?

1. Open the terminal

Press control + space to open Spotlight and search terminal.app, then click the black icon of the terminal, thus opening the terminal command port under Mac. (I am used to opening it this way, other methods are also possible)

Then enter the following command:

/Applications/MAMP/Library/bin/mysqladmin -u root -p password

Then enter your user name Mac password, then enter the mysql password and confirm the password. This modification is OK.

2. Enter the MAMP folder configuration file to change the mysql password

At this time, you also need to open: /Applications/MAMP/bin/phpMyAdmin-X.X.X/config.inc.php

This file, find $ cfg['Servers'][$i]['password'], change the password you just changed.

$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i ]['user'] = 'root'; // MySQL user


$cfg['Servers'][$i]['password'] = '123'; //Pay attention to full-width and half-width styles, etc.

After these two steps, the mysql password of the PHP integrated environment MAMP under Mac has been correctly modified.

The above introduces how to change mysql password and change the mysql password of MAMP, including the content of changing mysql password. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template