I don't have a clue how I managed to do it, but at some point over the past few days I've managed to change my MAMP Pro username and password to something other than root:root. I've been working locally on a Wordpress build so it must have been something I did then but like I said I haven't a clue how I did it.
I'd like to change the MAMP settings back to their default ones, as now all of my old sites are not working locally (unless I were to go into the config files of every single one and change the mysql username and password). I've tried the 'reset to factory settings' function in MAMP Pro but it doesn't seem to have changed the username and password, and I can no longer connect to MySql or to the MAMP Webstart screen.
Would a clean install sort this out? Also, how would I go about changing my MySql username and password if I cannot connect to it through MAMP?
Assuming you still know the password, you can change the password back to root using
/Applications/MAMP/Library/bin/mysqladmin -u root -p password root
It'll prompt you to enter a password again, after which it'll be reset to root
Related
I need help with the proper sequence and locations for changing the root username and password in MAMP PRO, not MAMP, I can get that to work fine.
I was using MAMP (free), and had no problem updating the username and password from root to a username and password, and it worked fine to log into phpmyadmin. I upgraded to MAMP PRO for more host capabilities and have been having trouble with this error. i know it is something to do with the password, but can't figure it out.
mysqli_real_connect(): (HY000/1045): Access denied for user 'root'#'localhost' (using password: YES)
here is what i tried:
i uninstalled MAMP and MAMP PRO and deleted the file folders in my C drive.
then i started a fresh install.
it installed fine and i could log into phpmyadmin with the generic root settings. from there i changed the username and password in the root account.
Then i went to the MAMP PRO folder to look for the configure.inc.php file to update the username and password, but it is not in there. there is no bin or phpmyadmin folders in it. there is in the MAMP folder, but it does not help if i change anything in there.
so, after that i cannot get back into phpmyadmin in MAMP PRO unless i uninstall it, delete the file folders and reinstall again. maybe i need to have both mamp and mamp pro installed, but i tried that with my first install of mamp pro and it didn't work.
i am sure this will get some down votes, but i just need some help at this point and MAMP customer service has not yet responded.
thank you!
well, i figured it out and will put the answer here for anyone else with this problem in the future. in MAMP Pro you stop the server and then click on the mysql client on the left in hosts and a window pops up so you can change the password. i could not change the root username, but just added a new user with my name and my password, so all the hosts are protected and not giving me the error. i was then easily able to add it to valentina studios.
I have recently installed MySQL 5.7.16 on an iMac running El Capitan. I had a few minor hiccups initially because I forgot the root password but that has now been reset and I can now log into MySQL as root user using:
$ mysql -u root -p
However, when I try to connect to MySQL server as root using SequelPro, I get the message:
Unable to connect via the socket, or the request timed out.
Double-check that the socket path is correct and that you have the necessary privileges, and that the server is running.
MySQL said: Your password has expired. To log in you must change it using a client that supports expired passwords.
When I look in /tmp folder, I was expecting to find mysql.sock but, instead, there is a file called mysql.sock.lock. Could this be causing the problem? I can't find where that .lock file has come from and I'm not sure what to do about it. Any help would be appreciated.
I'm not entirely sure what happened to cause the root password to expire but something had thrown a spanner in the works. Anyway, the solution for me was to log into MySQL from the Terminal using:
$ mysql -u root -p
...and then alter the root user's password using:
> ALTER USER 'root'#'localhost' IDENTIFIED BY 'NewPass';
That seemed to do the trick. I was then able to log in to MySQL using Sequel Pro with no problems.
Instead of using a socket connection, you could try connecting via Sequel Pro's standard connection using 127.0.0.1 as the host.
Thus spake the 5.7 docs:
The installation process creates only a single root account, 'root'#'localhost', automatically generates a random password for this account, and marks the password expired. The MySQL administrator must connect as root using the random password and assign a new password. (The server writes the random password to the error log.)
So, connect from terminal and change the root password.
Either your first password may not have been saved OR it just truly never persisted.
For me it was the sudo /usr/local/bin/mysql_secure_installation that may not have ever persisted the password correctly. Since your first password never changed, there is no password or ,like your error said, "expired" to nothing.
Run or rerun the code above, don't type anything for the password field and follow the steps, from the preloaded setup program.
HI Any one can help me that how i can reset my phpmyadmin root password.
when i am going to open localhost/phpmyadmin i got this error..
"
Your configuration file contains settings (root with no password) that correspond to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user 'root'. "
and when i click on user to change my password i face this error
Error : Token mismatch
I also try this method:
After started XAMPP server, i go to the browser and type the URL localhost/security/ (incase you've modified XAMPP server port, you need to include that port number also in previous URL). The security page will be shown where you can change the root password for MySQL. This will update the phpMyAdmin config also.
i have follow this method but i cannot solve my problem plz help me out this problem
Go to \xampp\phpMyAdmin\config.inc.php
then
$cfg['Servers'][$i]['password'] = 'WhateverPassword';//near line 21
or Run this command
mysqladmin.exe -u root password 'WhateverPassword'
And Possible Duplicate of Resetting MySQL Root Password with XAMPP on Localhost
I found this answer here, but still can't create a new Database.
I was also told that the default the password for root is blank, that didn't work, tried password, root etc :(
I'm stuck at the password screen.
The only thing I can gather is that the default ip I was given doesnt work.
Check that mysql is running on server 127.0.0.1
Check that mysql is
running on port 3306 (note: 3306 is the default, but this can be
changed)
According to this tutorial on their site, I need to check that mysql is running on the right server ip, but how do I even do that? :(
Looks like the first problem here is the login. If blank as password is not working for you. Try to set a password first and then proceed with next steps
Here are instructions to reset/set the password for first time
http://dev.mysql.com/doc/refman/5.5/en/resetting-permissions.html
Or use
mysqladmin -u root password NEWPASSWORD
Once you are logged in you can easily create a database.
I have a mySQL database problem - I'm a newbie to this:
I've installed WAMP Server and I'm able to log into localhost then phpmyadmin to give the screen below (right image). But I get No xNo Privileges in red -- I see from online examples that I should see "Create new database":
Suggestions are welcome.
[I have no password and the login is just 'local']
You are getting this message because you have made up a userid and password.
MySQL's initial installation state has ONE userid defined called root.
This is the case regardless of how you installed MySQL, unless the install asks you for a password at installation time.
That is the SUPER USER and can do anything.
By default (again which ever way you install MySQL) this root user has no password.
So login to phpMyAdmin using :-
username = root
password = (leave this blank, empty)
Press the Login button.
You will now be loged in as root.
PS.
Its a good idea to add a password to this username, BUT PLEASE DONT FORGET IT, as recovery can be a pain.