Add to Favourites Add to Favourites    Print this Article Print this Article

Can I directly access a database and/or table ?

Yes. Out of the box, you can use URLs like http://server/pathTo/phpmyadmin/index.php?db=yourdb&table=yourtbl&target=script. Table and script parts are optional, see also FAQ 4.8. If you want http://server/phpMyAdmin/database[/table][/script] URLs, you need to do some configuration. Following lines apply only for Apache HTTP server. First make sure, that you have enabled some features within global configuration. You need Options FollowSymLinks and AllowOverride FileInfo enabled for directory where phpMyAdmin is installed and you need mod_rewrite to be enabled. Then you just need to create following .htaccess file in root folder of phpMyAdmin installation (don't forget to change directory name inside of it):

RewriteEngine On
RewriteBase /path_to_phpMyAdmin
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&table=$2&target=$3 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&target=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index.php?db=$1&table=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]

Was this answer helpful?

Also Read