Wamp How to modify MySQL access password _php tutorial

Source: Internet
Author: User
Tags learn php
Learn PHP, using the WAMP installation package to build Php+apache+mysql environment, WAMP official download address: http://www.wampserver.com/en/. But the default username is ' root ' and the password is empty. Now I need to change the password to the string I want. The installation directory for my wamp is "D:\wamp".

Search on the Internet a bit, tried many times, some are not feasible, such as directly modify the "D:\wamp\apps\phpmyadmin3.4.10.1\config.inc.php" file, will
Copy the Code code as follows:
$cfg [' Servers '] [$i] [' password '] = ';

Change to your own password:
Copy the Code code as follows:
$cfg [' Servers '] [$i] [' password '] = ' your password ';

The user name does not change, still ' root ', and then restart Wamp, the result is no.

You should log in to the MySQL client first, because the starting password is empty, so enter directly into the MySQL client. Input SQL command: UPDATE user SET Password=password (' Your Password ') where user= ' root '; It is important to note that the final semicolon of the SQL command should not be forgotten, otherwise the SQL statement will not take effect. There are blog posts online that also need to enter "flush priviliges", otherwise the password can not be saved, but I did not pass this step is also possible, my Wamp version is 2.2. Next, as the article begins, modify the config.inc.php file to
Copy the Code code as follows:
$cfg [' Servers '] [$i] [' password '] = ';

Modify powertrain only through the command line modified password, note must be the same OH.
Copy the Code code as follows:
$cfg [' Servers '] [$i] [' password '] = ' your password ';

The user name does not change, still is ' root ', finally restarts the Wamp to be possible!

http://www.bkjia.com/PHPjc/327018.html www.bkjia.com true http://www.bkjia.com/PHPjc/327018.html techarticle learn PHP, using the WAMP installation package to build Php+apache+mysql environment, WAMP official download address: http://www.wampserver.com/en/. But the default username is ' root ' and the password is empty. ...

  • 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.