MAMP MySQL Access Denied Error

MAMP MySQL Access Denied Error

After installing MAMP 2.0.5 and changed MySQL’s default root password, I kept getting the following error messages: The phpMyAdmin still works, because I have already updated the config.inc.php, but this popup every time I start MAMP server is just annoying. And I have found a way to fix this. To fix the first error Open file “/Applications/MAMP/bin/quickCheckMysqlUpgrade.sh” and update the password in it
/Applications/MAMP/Library/bin/mysqlcheck --quick --check-upgrade -u root -p{changeme} --socket=/Applications/MAMP/tmp/mysql/mysql.sock mysql
Do the same for the following files too: “/Applications/MAMP/bin/upgradeMysql.sh” “/Applications/MAMP/bin/checkMysql.sh” To fix the second error update the password as well in file: “/Applications/MAMP/bin/mamp/index.php”

<?php
include_once 'php/functions.php';

$port = '3306';
$link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', '{changeme}');

if (!$link) {
exit('Error: Could not connect to MySQL server!');
}
mysql_close($link);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>MAMP</title>
</head>
<frameset rows="39,*" frameborder="no" border="0" framespacing="0">
<frame src="<?php echo $language; ?>/navigation.php?language=<?php print $language; ?>" name="navigationFrame" id="navigationFrame" scrolling="No" noresize="noresize" />
<frame src="<?php echo $language; ?>/index.php?language=<?php print $language; ?>" name="contentFrame" id="contentFrame" />
</frameset>
</html>

After the changes, both errors should just disappear.

Leave a Reply

Your email address will not be published.

My new Snowflake Blog is now live. I will not be updating this blog anymore but will continue with new contents in the Snowflake world!