- This topic is empty.
-
AuthorPosts
-
April 17, 2013 at 8:55 pm #44196
Zany90
MemberBasically the problem is that every time I launch MAMP PRO and start the servers, when the MySQL server attempts to start I get this message…
Error message:
/Applications/MAMP/Library/bin/mysqlcheck: Got error: 1045: Access denied for user ‘root’@’localhost’ (using password: YES) when trying to connect
Then I try out of curiosity the webstart button to attempt to open the MAMP start page… and I get this error
Error: Could not connect to MySQL server!
Finally I use the “Launch PhpMyAdmin Button”.. and I get this error
Error
MySQL said:#1045 – Access denied for user ‘root’@’localhost’ (using password: YES)
Unknown language: en-iso-8859-1.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.This all seems to have happened when I stupidly tried to create a new user in PHP myadmin and I think I have entirely messed up the “root” account – However with this kind of topic this is as far as my knowledge goes… I am baffled..
How can I restore everything to normal so that I can access the MAMP start page, phpmyadmin etc ??? Ive tried completely uninstalling MAMP/MAMP PRO, nothing..
I’ve looked high and low on Google and all I can find are pages of words that are double dutch to me… I dont understand what the problem is basically. This will probably sound really stupid to alot of you but I really do not know what to do here I would just like MAMP PRO to work again.. when ive tried to read all of these “fixes” they talk about the root account, but since i edited the root account in phpmyadmin – what account are they talking about, a database account, the root account of the computer itself?? I really don’t even care enough to know all I want is it to work again … im SO confused..
Can someone please explain to me in laymens terms whats happened here and how I can fix it? I would be so greatful…
April 17, 2013 at 9:49 pm #132236Alen
ParticipantYou will need to use the terminal to revert any changes.
– `mysql -u root`
– `UPDATE user SET password=PASSWORD(‘EnterYourNewPassword’) WHERE user=”root”;`
You might need to flush privilages,
– `FLUSH PRIVILEGES`
Then just restart your MySQL server.
eta: I never password protect my development environment, because everything is local. If I had someone unauthorized on my machine, I think mysql password would be least of my worries.
April 17, 2013 at 10:00 pm #132237Zany90
MemberOK – Im probably totally stupid… but when I enter the first command in terminal I get
-bash: mysql: command not found
April 17, 2013 at 10:07 pm #132238Alen
ParticipantIs MAMP running?
April 17, 2013 at 10:50 pm #132240Zany90
Memberyeah it was running when i tried that – and the little asterick was beside both apache and mysql indicating that they were both running
Last login: Thu Apr 18 02:59:17 on ttys000
(null):~ Jonny$ mysql -u root
-bash: mysql: command not found
(null):~ Jonny$Then actually trying to view the mamp start page will say
Error: Could not connect to MySQL server!
April 18, 2013 at 12:21 am #132242Alen
ParticipantInteresting. I’m on Linux so mysql is actually installed on my system. Not sure if MAMP installs mysql on your system or does it contain mysql in it’s own “bubble” for lack of a better word. Maybe someone with MAMP experience can chime in.
Are you able to navigate to MAMP configuration files and see that the passwords match. Is it possible you didn’t change the password in the configuration files (since changing the password in the mysql database/table is something different)? When you created the new user did you grant all the privileges?
Also,
> Ive tried completely uninstalling MAMP/MAMP PRO, nothing..
the fact that you did this, could be causing more problems. It might have overwritten some config files.
Figure out how to completely purge MAMP from your system, then install it again.
From [the help page](http://www.mamp.info/en/documentation/faq.html):
> To “uninstall” MAMP, you only have to delete the MAMP directory and everything returns to the original state (MAMP does not alter anything on the “normal” OS X).
Hope that helps,
-AlenApril 18, 2013 at 1:04 am #132243__
Participantxampp (the linux version of mamp) includes its own mysql, and doesn’t add anything to the path (so you can’t use the command without a path).
try using the path to mamp’s mysql (I am **guessing** that it is something like `/Applications/MAMP/Library/bin/mysql` – you’ll need to check and make sure!!!)
/Applications/MAMP/Library/bin/mysql start
(continue if it says it is already running)
/Applications/MAMP/Library/bin/mysql -u root -p
(type your password)
follow @AlenAbdula’s steps
April 18, 2013 at 2:03 am #132251Htmlmainiac
Member@trag I think your right but I’m on a windows so not shure
April 18, 2013 at 7:41 pm #132373Zany90
MemberWell some things now appear to be working.. That was my stupidity not knowing to point towards the directory… The only problem is that when i execute the commands above this is the output
/Applications/MAMP/Library/bin/mysql -u root
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.5.25 Source distributionCopyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.
mysql> UPDATE user SET password=PASSWORD(‘root’) WHERE user=”root”;
ERROR 1046 (3D000): No database selected
mysql> show databases
->… I still really don’t know whats going on here..
I also tried
mysql> -u root password root
->However i still get “Error: Could not connect to MySQL server!” when I try to open the MAMP start page… It would help if i understood what the problem actually was but im lost
April 19, 2013 at 12:02 am #132386__
Participantif
/Applications/MAMP/Library/bin/mysql -u root
worked without entering your password, that means you never set a password for root (by default, the password is blank). Besides, if you’re already logged in (you already have a `mysql>` prompt), logging in again doesn’t make any sense.
As for “reinstalling” MAMP, refer back to @AlenAbdula’s post: delete the entire folder (**backup** your files **first**!), then re-install.
Also referring to the [MAMP help page](http://www.mamp.info/en/documentation/faq.html) (if you don’t want to re-install):
> Please bear in mind that you also have to change the phpMyAdmin configuration and probably your own php-scripts to use the newly created MySQL password. For changing the phpMyAdmin configuration edit the following file and update the password:
`/Applications/MAMP/bin/phpMyAdmin-X.X.X/config.inc.php`Make sure PHPMyAdmin is configured with the correct password.
January 16, 2016 at 9:24 am #236879nicasi
ParticipantI had this error popping up while running MAMP and WAMP at the same time. (I was trying to copy a database from the WAMP environment to MAMP)
If you running both this might be the issue. Shutting down WAMP and restarting MAMP solved the issue.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.