網頁

2013年2月20日 星期三

MAMP


[MAC] MAMP架站懶人包輕鬆架設WebServer(Apache|MySQL|PHP)





Error: Could not connect to MySQL server!

Error: #1045 - Access denied for user 'root'@'localhost' (using password: YES) 



I recently changed my root password for MySQL and forgot that I had done so.. when I restarted MAMP I got :

Error: Could not connect to MySQL server!
MAMP : Error: Could not connect to MySQL server!
Simple fix, open :

/Applications/MAMP/bin/mamp/index.php
and update the root users password :
$link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'newpassword');
if you get this screen :
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
#1045 - Access denied for user 'root'@'localhost' (using password: YES)
Simple Fix : Open

/Applications/MAMP/bin/phpMyAdmin/config.inc.php
Update line below with new password (note: this is for a basic install of MAMP on Mac).

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。