Tagged Fiddles
- 1RevisionsForks
index.php
/(\$link\s*=\s*\@mysql_connect\s*\(\s*\x27:\/Applications\/MAMP\/tmp\/mysql\/mysql\.sock\x27\s*,\s*\x27root\x27\s*,\s*\x27)\w+\s*(\x27\s*\)\s*;)/gReplace the MySQL root user's password in /Applications/MAMP/bin/mamp/index.php<?php include_once 'php/functions.php'; $port = '3306'; $link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'NEWPASSWORD'); 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> - 3RevisionsForks
checkMysql.sh
/(-u\s*root\s*-p\s*)\w+/gReplace the MySQL root user's password in /Applications/MAMP/bin/checkMysql.sh et al# /bin/sh /Applications/MAMP/Library/bin/mysqlcheck --all-databases --check --check-upgrade -uroot -p MyPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock # /bin/sh /Applications/MAMP/Library/bin/mysqlcheck --quick --check -u root -p MyPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock mysql # /bin/sh /Applications/MAMP/Library/bin/mysqlcheck --all-databases --repair -u root -p MyPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock # /bin/sh /Applications/MAMP/Library/bin/mysqladmin -uroot -pMyPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock shutdown # /bin/sh /Applications/MAMP/Library/bin/mysql_upgrade -uroot -p MyPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock --force - 2RevisionsForks
config.inc.php
/(\$cfg\s*\[\s*\x27Servers\x27\s*]\s*\[\s*\$i\s*]\s*\[\s*\x27password\x27\s*]\s*=\s*\x27)\w*(\x27;.*[\n\r])/gReplace the MySQL root user's password in /Applications/MAMP/bin/phpMyAdmin/config.inc.php$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed // with 'config' auth_type) $cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only