• In Chat
  • About
  • Contact
  • Browse

    Latest Coding

    Latest Daily

    Latest Health

    Featured Story

Coding 2018

| Begin | File Bank |  Register | Reply | Search | Statistics | Manual |
Local Coding / Local /  
 

MAMP file password alterations needed for mysql check and refresh

 
Author Admin
Admin


#1 | Posted: 9 Oct 2018 08:08 
I restarted my Mac yesterday. After the boot process has completed I restarted MAMP but was met with a warning message with regard to upgrading the databases ...

mysqlcheck: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES)

When I checked with all 3 checks found under 'Tools' all failed with the same message.

THE FIX

Team Treehouse

The page above came to the rescue. I will repost the contents just in case it should go offline ...

1. Start MAMP

The MySQL server must be running to change the password, open and start MAMP now. keep it running until the end of this.
2. Mac Terminal

With the MySQL server running, open the terminal (located in '/Applications/Utilities') enter or copy/paste the following:

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

You'll be prompted for a password. Enter the current password for the root user. If you changed it in phpMyAdmin, use that password.

YourUsername at YourComputer in ~
$ /Applications/MAMP/Library/bin/mysqladmin -u root -p password
Enter password:

Enter the new password you want to use, and confirm it.

YourUsername at YourComputer in ~
$ /Applications/MAMP/Library/bin/mysqladmin -u root -p password
Enter password:
New password:
Confirm new password:

The password has been changed! Almost done.

You need to replace all occurrences of the old root password with the new one you just created. To keep it easy here are a list of the files, you can open them in your favorite text editor and search for 'root', changing '-proot' to '-pNewPassword', replacing 'NewPassword' with your own.

/Applications/MAMP/bin/phpMyAdmin/config.inc.php

/Applications/MAMP/bin/checkMysql.sh
/Applications/MAMP/bin/quickCheckMysqlUpgrade.sh

/Applications/MAMP/bin/repairMysql.sh
/Applications/MAMP/bin/stopMysql.sh
/Applications/MAMP/bin/upgradeMysql.sh

Examples of the edited files: /Applications/MAMP/bin/checkMysql.sh

# /bin/sh
/Applications/MAMP/Library/bin/mysql_upgrade -u root -pNewPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock --force

/Applications/MAMP/bin/quickCheckMysqlUpgrade.sh

# /bin/sh
/Applications/MAMP/Library/bin/mysqlcheck --quick --check-upgrade -u root -pNewPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock mysql

/Applications/MAMP/bin/repairMysql.sh


# /bin/sh
/Applications/MAMP/Library/bin/mysqlcheck --all-databases --repair -u root -pNewPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock


/Applications/MAMP/bin/stopMysql.sh

# /bin/sh
/Applications/MAMP/Library/bin/mysqladmin -u root -pNewPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock shutdown

/Applications/MAMP/bin/upgradeMysql.sh

# /bin/sh
/Applications/MAMP/Library/bin/mysql_upgrade -u root -pNewPassword --socket=/Applications/MAMP/tmp/mysql/mysql.sock --force

phpMyAdmin line 87

/Applications/MAMP/bin/phpMyAdmin/config.inc.php

$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = 'NewPassword'; // MySQL password

Stop and restart MAMP

I carried out the above and the error message has gone away and I can carry out all the tasks.
Website Designer

Your Reply Click this icon to move up to the quoted message


 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.

 

 
Coding Powered by Forum Software miniBB ®
Online now: Guests - 1
Members - 0
Max. ever online: 33 [10 May 2019 12:44]
Guests - 33 / Members - 0
No Of Posts

  • Latest Daily Post ...

  • Latest Health Post ...

CONTACT

Phone: +01 0775 8107 427

sport4u2018@gmail.com

WEBMASTER

email icon Mark Jones

Latest Story

RANDOM CODING

  • Copyright © 2018 MKJ Brainwaving
↑ TOP