stephennoble Posted August 26, 2012 Report Posted August 26, 2012 Hi Killersite Community, I was wondering if someone could help,,, i've searched online for hours tried every possible solution but still with no luck at changing the root USER password of my PHP myAdmin MySql from: $server = 'localhost'; $user = 'root'; $pass = ''; /////// If i use root as password it dosen't work...... if i use $pass = ''; it works $db = 'fp_cms'; I tryed changing the root password using the phpmyadmin user interface but keep getting errors....... EVERY ONE SAID ON THE FORUMS THEY CAN"T SEEM TO FIX THIS PROBLEM AND RECOMMEND USING XAMPP because it's really easy to change the ROOT USER PASSWORD with out getting ERRORS ................................. I'm sure i'm not the first person to to encounter this problem..... BELOW IS THE instructions i used to change MY ROOT password in WAMP..... didn't work ---------------------------------------------------------------------------------------- C.5.4.1.1. Resetting the Root Password: Windows Systems On Windows, use the following procedure to reset the password for all MySQL root accounts: 1. Log on to your system as Administrator. 2. Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager: From the Start menu, select Control Panel, then Administrative Tools, then Services. Find the MySQL service in the list and stop it. If your server is not running as a service, you may need to use the Task Manager to force it to stop. 3. Create a text file containing the following statements. Replace the password with the password that you want to use. UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; /// change 'MyNewPass' to the new password you want FLUSH PRIVILEGES; Write the UPDATE and FLUSH statements each on a single line. The UPDATE statement resets the password for all root accounts, and the FLUSH statement tells the server to reload the grant tables into memory so that it notices the password change. 4. Save the file. For this example, the file will be named C:\mysql-init.txt. 5. Open a console window to get to the command prompt: From the Start menu, select Run, then enter cmd as the command to be run. Start the MySQL server with the special --init-file option (notice that the backslash in the option value is doubled): 6. C:\> C:\mysql\bin\mysqld-nt --init-file=C:\\mysql-init.txt 7. FOR MY MACHINE USING WAMP Type this line -------------------------------------------------------------------------------- CORRECT COMMAND PROMPT TO CHANGE ROOT PASSWORD c:\wamp\bin\mysql\mysql5.5.24\bin\mysqld.exe wampmysqld --init-file=C:\\mysql-init.txt Quote
Mick Posted August 26, 2012 Report Posted August 26, 2012 Nobes, Thank you so much! Your problem is my solution! I could not get access to the database, and thus could not follow along in the CRUD with PHP and MYSQLI course. I turned off my firewall and went through many pages of Google search results, but still kept getting the access denied message. In your post, you use $pass = ''; I updated by connect-db.php file from using $pass = 'root'; to using $pass = ''; and it works!!! I'm so excited. Question for you--if $pass = ''; works for you, then why add a password? Anyway, I hope someone can help you, but if all else fails and you still want a password, you can simply reinstall WAMP. (Save the www subdirectory somewhere else first so you don't lose your files.) Quote
stephennoble Posted August 26, 2012 Author Report Posted August 26, 2012 Nobes, Thank you so much! Your problem is my solution! I could not get access to the database, and thus could not follow along in the CRUD with PHP and MYSQLI course. I turned off my firewall and went through many pages of Google search results, but still kept getting the access denied message. In your post, you use $pass = ''; I updated by connect-db.php file from using $pass = 'root'; to using $pass = ''; and it works!!! I'm so excited. Question for you--if $pass = ''; works for you, then why add a password? Anyway, I hope someone can help you, but if all else fails and you still want a password, you can simply reinstall WAMP. (Save the www subdirectory somewhere else first so you don't lose your files.) That's alright mate......it's awesome that i could help you... "I updated by connect-db.php file from using $pass = 'root'; to using $pass = ''; and it works!!!" Yeah i was having the same problem because i was following along with the tutorials the same way as you and using ROOT as the password wasn't working so i just tryed using no password..... HOPEFULLY BEN or Stefan.....from Killersites..... know the answer to this problem...... Your Server should use a password because it's more secure... and better practice...... BUT CHANGING IT inside PhpMyadmin is a nightmare when using WAMP....... And this shouldn't be the Case when you consider how much code goes into making WAMP you'd think they could get this right...... Quote
benjaminmorgan Posted August 26, 2012 Report Posted August 26, 2012 I think root is the password on WAMP. On Windows it is blank until you create one. You can change the password by going to localhost/phpmyadmin then click Priveleges on the top navigation. It's pretty easy. Quote
falkencreative Posted August 26, 2012 Report Posted August 26, 2012 @Benjamin Morgan is correct -- the password differs between MAMP (for Mac) and WAMP (for Windows). On WAMP, it's a blank string ("") but when using MAMP, it's "root". I thought I had mentioned that fact in every video I've made that talks about setting up a connection to the database, but it looks like I missed that on that particular video. I'll have to add a note within the video. As a side note, when using MAMP or WAMP, the password security really doesn't matter. It only exists on your local computer, and no one can access it other than you. Password security only really matters for a service that is connected to the internet and that other users can access. Quote
benjaminmorgan Posted August 26, 2012 Report Posted August 26, 2012 If your host uses phpmyadmin, you would change it the same way. For local computer's there isn't much use for one. Quote
stephennoble Posted August 27, 2012 Author Report Posted August 27, 2012 Hi Killersites Crew, Cheers for the comments...... I actually ended up finding a clip on you-tube that helps you change your phpMyAdmin Password....... The problem is that you need to change it not only in PHPMyAdmin UserInterface, but to make it work You also need to also change the password in the config.inc.php file ...... to make it work..... Directory C:\wamp\apps\phpmyadmin3.5.1 ANYWAY here's the link: ENJOY Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.