phpBBHacks.com, the place for phpBB users

Bookmark and Share

How to Install and Use phpMyAdmin

How to Install and Use phpMyAdmin

Postby Acid » December 7th 2002, 7:55 am

Step 1 - Download
*Link: phpmyadmin

Step 2 - Untar or unzip the distribution
*be sure to unzip the subdirectories
*after that rename folder to phpmyadmin

Step 3 - Configuration
*open config.inc.php and set the values to access your database
$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname
$cfg['Servers'][$i]['user'] = ''; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password
$cfg['Servers'][$i]['only_db'] = ''; // Database name


Step 4 - Upload and..
*upload /phpmyadmin to your server
*point your browser to phpmyadmin (e.g. http://www.domain.com/phpmyadmin/)
*if you see a red error message (The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file!) you have to set the directive in config.inc.php
*open config.inc.php and find/change (change the path to phpmyadmin)
$cfg['PmaAbsoluteUri'] = 'http://domain.com/phpmyadmin/';


Step 5 - Queries
*click on any table in the left frame
*now you´ll see in the right frame a big textarea ("querybox"), maybe you have to scroll down a little bit
*cut/paste the queries (from a hack install file) into the querybox (the prior text in the querybox will be replaced; it´s ok)
*hit the Go! (or Ok-) Button (you´ll see if you was successfull or not)

Step 6 - safe is always good
*create a file called .htaccess with the following content
AuthType Basic
AuthName "Restricted Directory"
AuthUserFile /home/www/whatever/html/phpmyadmin/.htpasswd
require valid-user

*you have to change the blue part, if you don´t know how the path should look like, paste the following code in a file called whatever.php, upload to /phpmyadmin and execute
Code: Select all
<?
  echo "the path is: "; 
  $path = ereg_replace ("\\\\","/",__FILE__); 
  $path = dirname ($path); 
  $path = trim($path);
  echo "<b>$path</b>"; 
?>

*now create a file called .htpasswd, the content should look like (blue is username/red is password)
name:2d.JddK0g5454Tls

*to generate a crypted password check :: http://www.inch.com/info/tech/HOWTOS/ht ... asswd.html (paste the result into .htpasswd)
*upload both files to /phpmyadmin

You should now be all set with a running copy of phpMyAdmin.
User avatar
Acid
VIP
 
Posts: 5997
Joined: May 29th 2001, 7:00 pm
Location: Berlin

Return to phpBB 2: Tools and Related Topics

Who is online

Users browsing this forum: No registered users and 0 guests