Jump to content
Larry Ullman's Book Forums

Setting new MySQL root password on MAMP


Recommended Posts

Dear Larry,

I installed MAMP (version 5.01) on my Mac and I tried changing the password of the MySQL root user following the instruction on the MAMP web site, i.e. passing the following command in terminal:
/Applications/MAMP/Library/bin/mysqladmin -u root -p password 

Then I am asked to enter a password. But when I do so I get:

connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

I tried doing it again and entering 'YES' as a password (we never know, it might work), but I get the same result.

Now,  is it really necessary to change the root user password if I am going to use MAMP only to learn and what am I doing wrong?

Thanks in advance for your help.

 

Link to comment
Share on other sites

Hey Julien! So long as you're never storing anything sensitive in your local MySQL database, I don't think it's a problem to leave the password unchanged. And, if you change the root password in MySQL, you'll need to change your phpMyAdmin config, too. So that's another argument against. 

That being said, what you're doing wrong is not using the correct current password! According to Google searches (and I thought I said this in the book), the default root user password should be "root". 

  • Like 1
Link to comment
Share on other sites

Hello Larry, 

Thank you for your swift support.
It was indeed all explained in your book. I was simply not taking it in the correct order. My bad.

After changing the password, my Terminal showed this message:
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
How can I check if my Internet provider gives me a SSL connection?

Now, this shows that actually I don't understand what is MAMP (or XAMPP). So I'm going to ask a series of questions that will probably look stupid to you (sorry about that):
What happens for example, when I place files in the htdocs folder?
Does it "stay" on my computer or is it "sent" over the Internet? I don't understand what is the risk?

When I am going to create a web site, am I going to create and manage my database directly on the space provided by a web-hosting provider through phpMyAdmin or will I do this first on MAMP and then upload it on the server?

 

 

Link to comment
Share on other sites

Just one more:

Now when I open MAMP, it asks me to upgrade MySQL Databases. And when I try to do so, I get the following message:
mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
 

Link to comment
Share on other sites

On 8/14/2018 at 2:57 AM, Julien said:

After changing the password, my Terminal showed this message:
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
How can I check if my Internet provider gives me a SSL connection?

Your internet provider does not give you an SSL connection. You should be using the Terminal on your Mac to connect to MySQL on your Mac, so it should be okay that it's not SSL.

On 8/14/2018 at 2:57 AM, Julien said:

Now, this shows that actually I don't understand what is MAMP (or XAMPP). So I'm going to ask a series of questions that will probably look stupid to you (sorry about that):
What happens for example, when I place files in the htdocs folder?
Does it "stay" on my computer or is it "sent" over the Internet? I don't understand what is the risk?

Nothing happens. The files are all on your computer.

On 8/14/2018 at 2:57 AM, Julien said:

When I am going to create a web site, am I going to create and manage my database directly on the space provided by a web-hosting provider through phpMyAdmin or will I do this first on MAMP and then upload it on the server?

When you go to create a website *on a hosted server*, you'll export the database from your local MAMP installation and then import it (using phpMyAdmin or whatever) on the hosted server.

On 8/14/2018 at 4:39 AM, Julien said:

Just one more:

Now when I open MAMP, it asks me to upgrade MySQL Databases. And when I try to do so, I get the following message:
mysql_upgrade: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) while connecting to the MySQL server
Upgrade process encountered error and will not continue.

I'm not familiar with upgrading the MySQL database, but that error would suggest you're using the wrong password. 

  • Like 1
Link to comment
Share on other sites

Hello Larry,

 

Thank you for these explanations.
Bit by bit I start understanding how it works.
Regarding the database upgrade, I had upgraded it before changing the password and it works like that anyway. So I just disregard the error message.

 

Best regards,

Julien

Link to comment
Share on other sites

 Share

×
×
  • Create New...