Installing/Using phpMyAdmin [SOLVED]

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Installing/Using phpMyAdmin [SOLVED]

Post by califdon »

I just installed phpMyAdmin (as well as a complete LAMP suite) on my Ubuntu 9.04 that I only use for kicks. Everything works, but I can't figure out how to start phpMyAdmin! Sounds stupid, but I can't find any of the php scripts to browse. I've used phpMyAdmin for years on a hosting service, but I never needed to use it on a local server. :oops:
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: Installing/Using phpMyAdmin

Post by Doug G »

Try http://localhost/phpmyadmin/ and see what happens. In Fedora if you use yum to install phpmyadmin I think the actual files end up in /usr/share/ and an included httpd.conf file sets up the virtual directory.

If you installed phpmyadmin you should be the one who knows where it's files reside :) You could always go get the tarball and unpack it to wherever you want.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Installing/Using phpMyAdmin

Post by Benjamin »

In a lot of installs the OS sets up a virtual host for phpMyAdmin. So if apache is running and you visit http://localhost/phpMyAdmin/ it will pull it up. On my system I changed it to http://localhost/mysql/

Regardless, phpMyAdmin is nothing more than a regular php application. You can simply copy it into a folder in your webroot and access it from there. This gives you more control over the configuration and version, since sometimes you may want a specific version of phpMyAdmin. Trust me when I say this... I have learned it from experience. Anyhow, once you download it into a folder under your webroot, you'll need to create a config.inc.php file. Here is mine, useful on localhost since you won't have to login every 10 minutes...

Code: Select all

 
<?php
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
$i++;
 
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['host']      = 'localhost';
$cfg['Servers'][$i]['user']      = 'root';
$cfg['Servers'][$i]['password']  = 'DBROOTPASSHERE';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
//$cfg['Servers'][$i]['connect_type'] = 'tcp';
//$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysqli';
/* Optional: User for advanced features */
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Optional: Advanced phpMyAdmin features */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma_relation';
// $cfg['Servers'][$i]['table_info'] = 'pma_table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma_column_info';
// $cfg['Servers'][$i]['history'] = 'pma_history';
// $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
 
/*
 * End of servers configuration
 */
 
/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
 
 
 
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Installing/Using phpMyAdmin

Post by califdon »

Thanks, guys! Yep, of course that did the trick. I didn't think to check the virtual host config. Some things are SOOO easy when you know the trick! Just proves you're never too old to learn! Thanks again, and I'll look into your suggestions, Astions. That sounds like something I'll want to do, and I do value experience in such matters.
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: Installing/Using phpMyAdmin [SOLVED]

Post by Zoxive »

Just a little more info, when you install it on Ubuntu the config files are usually in /etc/phpmyadmin, with the real application located at /usr/share/phpmyadmin.

So you can still change/customize all the stuff that you need to.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: Installing/Using phpMyAdmin [SOLVED]

Post by califdon »

Thanks for that, Zoxive, and it's good to see you back with us.
Post Reply