close

Recently, I've installed MAMP in my tiger. but after I changed my mysql password, I restart MAMP than I got a error message: Could not connect to MySQL server! 

I spent a lot of times to try to figure out what happen. Finally, I got a resolution. If you changeed your password of root, you also need to change your  password in this file: /Applications/MAMP/bin/mamp/index.php.

 

    change /Applications/MAMP/bin/mamp/index.php file

    original:

    $port = '3306';

    $link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'root');

 

    change to

    $port = '8889'; //this port number is MAMP original useing.
    $link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'yourpassword');


Than try to restart your MAMP and go into star page again. Everything will be fine!

you can reference:http://forum.mamp.info/viewtopic.php?f=2&t=1719

 


arrow
arrow
    全站熱搜

    大爺 發表在 痞客邦 留言(0) 人氣()