PhpMyAdmin

From Wikislax
Jump to: navigation, search

What is PhpMyAdmin ?

PhpMyAdmin is a PHP application that affords managing MySQL databases.

Installing PhpMyAdmin

Download and install for example in a subdirectory of the Apache DocumentRoot or under /usr/local using a symbolic link. The files must be readable by the user running apache.

# tar -C /usr/local -xvf phpMyAdmin-x.y.z.t-english.tar.gz
# cd /var/www/htdocs
# ln -s /usr/local/phpMyAdmin-x.y.z.t-english phpmyadmin
# cd phpmyadmin
# cp config.sample.inc.php config.inc.php
# cd ..
# chown -R apache:apache phpmyadmin

Edit config.inc.php to give a value (any string of max 46 characters) to $cfg['blowfish_secret'] = ''; that is used when $cfg['Servers'][$i]['auth_type'] = 'cookie';. Also add the lines $cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock'; & $cfg['Servers'][$i]['connect_type'] = 'socket';. After that it should be possible to open page http://localhost/phpmyadmin using your browser.

$cfg['blowfish_secret'] = 'mysecret'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
 * Servers configuration
 */
$i = 0;
/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['socket'] = '/var/run/mysql/mysql.sock';
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = false;


PHP Main Page MediaWiki