简体   繁体   中英

How can i get my mysql login and password?

I'm on a mac and am using Mamp. I 'm just trying to connect to my database through the function mysqli_connect(). But it says:

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

I have no idea whatsoever on how to retrieve my login and my password. I've read some posts and apparently it's on a php file: etc/phpmyadmin/config.inc.php but I cannot find it. Thanks.

Default user and password for MAMP is root . Or, you can use your own password by change it manually by run this on Terminal :

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM