How To Install Your Own Web Server – Installing phpMyAdmin

June 12th, 2008

This is finally the last post of this series on How To Install Your Own Web Server. In my last post I’ve shown you how to setup a virtual host and now we’re going to use this to install phpMyAdmin.

Of course, the purpose of this tutorial is not really to install phpMyAdmin but it’s rather to show you how to host multiple websites sharing a single IP address. Most of the time you will make use of a web hosting control panel but it’s always good to know what’s going on behind the scenes if you ever need to do some troubleshooting.

PhpMyAdmin is an open source application developed in PHP (of course!) to help you manage your MySQL databases from your web browser.

How To Install phpMyAdmin

Note: I noticed that the “mysql” php extension is required by phpMyAdmin. To enable the mysql extension, edit c:\php\php.ini and uncomment the line that reads extension=php_mysql.dll. You will need to restart the Apache2 service for the change to take effect.

This is going to be quite easy and you could use this very same tutorial to install phpMyAdmin on any web hosting account.

  1. Get yourself a copy of phpMyAdmin at http://www.phpmyadmin.net. At the moment of this writing, the latest stable version is phpMyAdmin 2.11.6.
  2. Extract the content from the archive to your hard drive in C:\www\phpmyadmin (if you followed this tutorial).
  3. Create a folder named config into C:\www\phpmyadmin (ie.: C:\www\phpmyadmin\config).
    PhpMyAdmin Installation Tutorial
  4. Open your browser to http://phpmyadmin (again, you need to have followed this tutorial here). You will get an error message that says “Access denied for user ‘root’…”.
  5. Click on the setup script link at the top.
  6. Click on the Add button in the Servers section.
  7. Set the Authentication Type value to http.
  8. Click on the Add button at the bottom of the form.
  9. Click on the Save button from the Configuration section. This will create a file in C:\www\phpmyadmin\config named config.inc.php.
  10. Move C:\www\phpmyadmin\config\config.inc.php to C:\www\phpmyadmin\config.inc.php
  11. Delete the config directory created in c:\www\phpmyadmin
  12. Open your web browser to http://phpmyadmin. You will be prompted to enter a username and password.
  13. Enter the credentials you specified in this post. You should now be able to manage your MySQL database.
    phpmyadmin

Isn’t it the greatest day of your life? Okay maybe not.

But the point is, you now need to create a new virtual host each time you want to add a new website to your web server.

Click here to subscribe to our RSS feed or to receive email updates.

26 responses so far ↓

avatar

1. Response by : david on Jun 16, 2008 at 7:30 pm

This doesn’t work at all.

As with all other tutorials it ends up with me trying to go to localhost/phpmyadmin/ and getting a “website declined to show page”

you are leaving out some crucial step

how about the fact that we need to make manual changes to the config.inc.php file?

forget to mention that for any particular reason?

avatar

2. Response by : The Web Hosting Hero on Jun 17, 2008 at 5:08 am

Hi David,

I’ve made a little video that shows you how I’ve done it:

http://www.youtube.com/watch?v=doMnOzLLY9E

Hope this helps.

The only difference in the video is that I extract files to c:\tmp before moving them to c:\www\phpmyadmin

Of course this is just a quick and dirty guide to get phpMyAdmin working. This is a tutorial to help you setup your own web server and not an advanced course on phpMyAdmin. See related posts for the previous steps.

For more info on phpMyAdmin configuration settings, visit http://www.phpmyadmin.net

Best regards,
Stephane

avatar

3. Response by : The Web Hosting Hero on Jun 17, 2008 at 5:51 am

I realize that the YouTube video format is kinda small so here’s the video in 640×480:

http://www.thewebhostinghero.com/videos/how-to-install-phpmyadmin.avi

avatar

4. Response by : Zak on Jun 17, 2008 at 7:24 am

it worked for me

avatar

5. Response by : damion on Jul 11, 2008 at 4:11 pm

well i cant even fucking run the god damn setup!!!

avatar

6. Response by : The Web Hosting Hero on Jul 11, 2008 at 4:17 pm

Damion I’d be happy to help you out if you could give more details of what went wrong.

avatar

7. Response by : Noobie on Jul 13, 2008 at 11:31 pm

Just a small sidenote for other noobs. In step nine, make sure the config directory you create has writable permissions or the SAVE button will be greyed out and unusable.

avatar

8. Response by : The Web Hosting Hero on Jul 14, 2008 at 8:35 am

Thank you for the comment Noobie, this is absolutely true. By default, the folder was writeable on Windows so I forgot to mention it.

avatar

9. Response by : abhinav on Sep 3, 2008 at 9:13 am

hey man i am getting this error on my link bar i donnot know how to solve it

“http://localhost/error.php?lang=en&dir=ltr&type=Error&error=Cannot+load+
[a%40http%3A%2F%2Fphp.net%2Fmysql%40Documentation]
[em]mysql[%2Fem][%2Fa]+extension.+Please+check+your+PHP+configuration.+-
+[a%40.%2FDocumentation.html%23faqmysql%40documentation]Documentation[%2Fa]”

and this error also

“Cannot load mysql extension. Please check your PHP configuration. – Documentation”

kindly guide me up to solve this error….please i am waiting for this…..

avatar

10. Response by : The Web Hosting Hero on Sep 3, 2008 at 9:20 am

Are you running Apache on Linux or Windows?

avatar

11. Response by : abhinav on Sep 3, 2008 at 9:58 am

apache on windows server 2003

avatar

12. Response by : The Web Hosting Hero on Sep 3, 2008 at 10:37 am

Try these:

1. Make sure the mysql extension is loaded in php.ini

2. Use a phpinfo() page to make sure the MySQL extension is loaded.

3. Copy c:\program files\mysql\mysql server 5.0\bin\libmysql.dll to c:\windows\system32

Don’t forget to restart Apache after every changes.

avatar

13. Response by : abhinav on Sep 3, 2008 at 11:17 am

after this even its not working dear…..beside this every thing is working fine Apache, PHP…. even MySQL too working fine but the phpmyadmin is not working…..[:(]

avatar

14. Response by : abhinav on Sep 3, 2008 at 11:57 am

hey brother i got it solved………..but thanks for the suggestions….thanks a lot [:)]

avatar

15. Response by : The Web Hosting Hero on Sep 3, 2008 at 12:13 pm

How did you finally solve it?

avatar

16. Response by : Rakotoniaina Andre on Sep 19, 2008 at 10:41 am

Thank you for your help.
The “save” button in configure section in phpmyadmin setup is deactivated and i could not save any change i made. Could you post a solution please? thanks in advance

avatar

17. Response by : The Web Hosting Hero on Sep 19, 2008 at 1:27 pm

Rakotoniaina Andre,

Make sure your config directory exists and is writeable (chmod 0777).

avatar

18. Response by : missingchord on Dec 10, 2009 at 9:34 am

i have a the same problem like abhinav encountered
how can i fix this? can somebody help me?

avatar

19. Response by : Satheesh on Jan 22, 2010 at 1:15 am

Missing chord,

In the “php.ini” file in the php directory there should be an entry for “extension_dir”, remove the “;” infront of this line.

Also, check whether there are any “;” entries prior to the line having “mysql.so”, if so remove it too and restart the Apache server to get this working.

You can also try installing using the setup GUI, and check if its any better than ur current method.

avatar

20. Response by : andrew on Nov 12, 2010 at 3:16 am

Please I need your help, am having issues with myphpadmin in cpanel, when I click on myphpadmin in my cpanel it prompt me for username and password which I don’t have. Can you help?

avatar

21. Response by : The Web Hosting Hero on Nov 12, 2010 at 9:27 am

@Andrew: did you create a MySQL user first? If not, you can always try using the root login.

See this post: http://www.thewebhostinghero.com/tutorials/mysql-gui-tools.html

avatar

22. Response by : Mike on Feb 3, 2011 at 9:40 pm

I just want the answer to one question. Is there any benefit to running Server 2008 x64 over Windows 7 Pro x64 IF.. you are going to use if JUST to run APACHE to host a website and some PHP databases.
If I end up turning off IIS and every other feature of windows server 2008, what does it offer that I can’t get from Windows 7 x64.
Apache is doing all the work. The performance characteristics are not much different in this scenario and the OS price difference is a lot!

avatar

23. Response by : chaliits on Mar 11, 2011 at 8:13 am

Hello. I have a server 2008. I install php, mysql and phpmyadmin to server. How i can add a multiple domains to my server. I have only 1 ip. Thanks :)

avatar

24. Response by : joseph on May 16, 2011 at 5:33 am

i want to know about phpmyadmin control in my hosting,that is can i create mysql database in my hosting or need to connect to my localhost phpmyadmin. answer me please..

avatar

25. Response by : marve25 on Jun 20, 2011 at 8:26 am

to me it says “HTTP 403 Forbidden” when i try to enter “http://phpmyadmin”
i have followed your previous tutorials and it still wouldn’t work.
my phpmyadmin version is 3.4.2

avatar

26. Response by : Charles on Aug 15, 2011 at 9:33 pm

Just to help some people, there are a few fixes that need to be resolved with new updates of PHP/MySQL
Do the following if you used this complete tutorial:

1. Open your PHP.ini file under C:\php\php.ini
update your extensions_dir with

extension_dir = “C:/php/ext”

Remove the “;” from these extensions:

extension=php_mysqli.dll
extension=php_mcrypt.dll

Also now in your windows host file: C:\windows\system32\etc\hosts
Using a text editor: Notepad

Add

127.0.0.1 phpmyadmin

In the httpd.conf file: C:\apache2\conf\httpd.conf

Find the lines and change “deny from all” to allow from all..

Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all

** Be sure to follow all of the steps in the tutorials.
** Now click the start menu, run: type services.msc and hit ok
** Find Apache2 or Apache2.2 service, right click and restart.
Now it should be working.

Thanks,
Charles

Leave a Comment




Webmaster Resources: Web Hosting Blog
© Copyright 2012 - TheWebHostingHero.com
Follow us on TwitterFacebookSubscribe to our RSS Feed