About This Entry

This page contains a single entry posted on 14 May 2007 01:57 PM.

The PREVIOUS post in this blog is titled > Site Move to New Upgraded Web Server Complete.

The NEXT post in this blog is titled > Learning Dad Tricks & all about Virtual Private Servers (VPS).

MORE entries can be found on the main index page or by looking through the archives.


Technorati search

» Blogs that link here

August 2014

Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30


Rad Linkage

Powered by
Movable Type 3.35
This weblog is licensed under a Creative Commons License.
Creative Commons License

« Site Move to New Upgraded Web Server Complete | Main | Learning Dad Tricks & all about Virtual Private Servers (VPS) »

Proficiency with Software & Setting Root Password for MySQL Database in phpMyAdmin under WAMP5

The coolest programs seem to have the steepest learning curves .. like Half Dome & El Capitan, which are both pretty steep

A big part of Indulging Your Technolust involves learning how to use cool software. Once your hardware is dialed in, and your system backed up (crucial step), it's time to become proficient with your favorite programs.

You've probably discovered (as I have) the coolest programs are often (not always) the most powerful. And the most powerful programs often involve the steepest learning curves.

Take Photoshop for example. Way cool. Way powerful. Lots to learn. Seems like I'm always calling Julie to ask how to do something in Photoshop.

This is cuz more power involves more features. More features come with more options, and more options lead to complexity. (You know the drill.)

Regulars will recall my recent forays into the (very cool) world of Content Management Systems, and how I've been playing with Drupal (one of the coolest). [My installation of Drupal 5.1 is > HERE.]

In fact, I moved the site recently (never much fun) to a new server in order to get MySQL 5.x, which is required for Drupal 6 (still in development). So I'm still on the steeper slopes of the content management curve, but starting to find traction.

••••• today's entry continues below ••••• 

Part of learning how to unleash Drupal's considerable power involves installing Apache web server (software) on your home machine, so you can first test configuration changes before re-configuring your live installation.

This way (the theory goes) if you screw up something, you don't kill your site. Plus, development goes much faster, since you don't have to keep uploading files & changes to your public server

Apache web server comes integratded in a program called WAMP (along with both MySQL 5.x & PHP 5.x), which I mentioned > here. If you ever install WAMP (not entirely unlikely, since it allows you to develop many very cool web-based applications), let me get you over the first hurdle you'll encounter.

After you install WAMP (running as localhost) you'll notice in phpMyAdmin (where you set up your MySQL databases) a warning that says you have no root password, saying this is not secure and should be corrected soon as possible.

But when you add a root password, you'll find you can no longer access phpMyAdmin, with an access denied MySQL error. I mean, it does not even give you a *chance* to enter a password. You have zero access to your database and can't do jack until this is resolved.

And if you don't know PHP (like me), you're gonna have trouble trying to interpret the config.inc.php file that the MySQL error references So you have to find a PHP interpreter.

Then you will search like a madman (not easy to find) until you find something like this, which instructs you to open the file config.inc.php in your phpMyAdmin folder (in WAMP) and make two changes (even tho it might say Do not edit this file):

Find line of code that looks (exactly) like this >
Edited $cfg['Servers'][$i]['password']='' and enter your root password between the single hash marks, so it looks like so >
Edited $cfg['Servers'][$i]['password']='your_root_password'

Then find line of code (~line 31) that looks like this >
$cfg['PmaAbsoluteUri'] = ''; and change to say this >
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin';

Voila! You're back in and your MySQL database has a root password. You're over the first hurdle, safe & secure, ready to develop some cool software applications.

Following my first access denied error, I simply re-installed the WAMP software, thinking I must've made some bone-head mistake. After the second error, I began searching for answers. You'd think, for a package this powerful, they could engineer a more elegant solution.

One more tidbit, it you set up a database for Drupal, give that user NO global rights, but full "Database specific privileges" (for your Drupal database), which should look like this.

FYI > I installed WAMP5 v1.7.1a. Best guide on WAMP > (Unofficial) WAMP Setup and Usage Guide

For more along these lines, here's a Google search preconfigured for the query > wamp5 root password mysql database phpmyadmin


TrackBack URL for this entry:

Comments (17)

QUOTE: You'd think, for a package this powerful, they could engineer a more elegant solution.

I am the administrator of wamp forum. wamp just adds phpmyadmin to its install package to help administer your mysql database. there is no difference between the phpmyadmin wamp installs and the phpmyadmin you can download from the phpmyadmin website and install yourself. so, after you install phpmyadmin with wamp or by yourself and you edit/change the root user's password, you will need to edit the phpmyadmin config file to work with your mysql server.

when you install mysql, whether by the wamp installer or by youself, it comes with the default root use set with no password. so, the wamp installer can not configure the phpmyadmin config file for you since you can only do that youself after mysql has been installed.

WAMP Forum Admin

Thanks for the insightful comment .. and the *killer* (unoffcial) WAMP guide. It's the best I've found on the 'Net.

I shoulda known, if it were possible to eliminate that hurdle, they would've done it.

It took me however, quite some time to figure out what was going on. Pulled out some of my hair trying to figure it out. Perhaps some quick-n-dirty "heads up" documentation beside the download link would help?

Not having the config.inc.php file in the phpMyAdmin directory didn't help. I believe the 1.7.1"a" revision fixed that.

While I'm on the subject of revisions .. the config.inc.php file (that we're supposed to edit to regain access) begins with this line:

/* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */

You can see how that would be confusing to a noobie. It was to me.

QUOTE: Not having the config.inc.php file in the phpMyAdmin directory didn't help. I believe the 1.7.1"a" revision fixed that.

yes, the latest version of wamp does fix that and a few more issues.

QUOTE: /* !!! DO NOT EDIT THIS FILE, EDIT config.inc.php INSTEAD !!! */

this means you are editing the wrong file.

Have you opened the config.inc.php fie that comes with 1.7.1a?

I have.

Look, and I think you'll find I'm correct.

Whoever did it simply pasted in the contents .. of that other non-php file. I forget the exact name, but it was similar to config.inc.

I know, cuz that's exactly what I did, as recommended by a poster in your forums.

Because there was no config.inc.php.


I have a short guide on setting up a local web server on WindowsXP Pro using IIS, MySQL, and PHP. I wrote it back in my Windows days.


These days, of course, I can whip together a LAMP (Linux, Apache, MySQL, PHP) server in just a few minutes. My favorite OS for a web server is FreeBSD.


I to am a newbie to wamp and fell foul of the pass word change. Having tried you solution I'm still can't access phpmyadmin - anybody got any other tips or tricks please.

You must've made a small typo. You have no choice but to uninstall & re-install WAMP, paying particular attention to passwords next time.


Cheers Rad, I'll get new glasses to see straight next time, worked a treat. Now comes the hard part of trying to learn how the whole thing works.


Glad it worked for you. Here's a good place to start:



I have tried your solution (i.e. editing config.inc.php), but as soon as I change the password from '' I get this error in phpmyadmin:

MySQL said: Documentation
#1045 - Access denied for user 'root'@'localhost' (using password: YES)

I've tried restarting all the services, but it doesn't help. So what is the answer?

Surely I would need to change the password in MySQL first, and then configure phpmyadmin to match. But how do I do that?


Dude, your post is so appreciated! I aped your noob mistakes almost verbatim! You provided the fork that let me enjoy the fine meal. Thanks again for your help.


Thanks very much for this invaluable (from the perspective of someone just getting started w/ PHP) bit of info. You rock.

tzvika ofek:

You solved my problem with wamp!


Powerful tools are complex. This is so true. The reason why many programmers opt for simpler codes for more simple functions. Less is more they say. If a beginner will choose of course he would want to try the simple one. Makes it more functional and useful.
expert on Panic Away Review


Sometimes when I install software I find it hard on how to install it properly. I am always in the way of knowing the proper steps in installing software.

I together with my buddies came taking note of the best ideas from your web blog then all of the sudden came up with a horrible suspicion I never expressed respect to the web site owner for them. These young men ended up as a result joyful to see them and have simply been tapping into these things. Appreciation for being simply kind and also for obtaining these kinds of extraordinary guides millions of individuals are really desirous to be aware of. Our own sincere regret for not saying thanks to you sooner.


Thanks for this page. I've just started working on learning about web servers and I had to look for quite some time to find these vary clear instructions for eliminating the #1045 error. Now if I could only figure out how to install MediaWiki...

Post a comment