当前位置:Gxlcms > PHP教程 > phpmyadminn装配

phpmyadminn装配

时间:2021-07-01 10:21:17 帮助过:4人阅读

phpmyadminn安装
(1)下载安装
打开http://www.phpmyadmin.net
下载phpMyAdmin-3.2.5-all-languages.zip
解压到网站路径内如/var/www
(2)基本配置
打开路径/var/www/phpMyAdmin-3.2.5-all-languages
备份config.sample.inc.php并改名为config.inc.php
修改config.inc.php
$cfg['blowfish_secret'] = '任意字符串'
根据情况修改其他配置项。
(3)高级配置
用以下sql语句创建一个新用户
GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
GRANT SELECT (
    Host, User, Select_priv, Insert_priv, Update_priv, Delete_priv,
    Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv,
    File_priv, Grant_priv, References_priv, Index_priv, Alter_priv,
    Show_db_priv, Super_priv, Create_tmp_table_priv, Lock_tables_priv,
    Execute_priv, Repl_slave_priv, Repl_client_priv
    ) ON mysql.user TO 'pma'@'localhost';
GRANT SELECT ON mysql.db TO 'pma'@'localhost';
GRANT SELECT ON mysql.host TO 'pma'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
    ON mysql.tables_priv TO 'pma'@'localhost';
GRANT SELECT, INSERT, UPDATE, DELETE ON .* TO 'pma'@'localhost';

将/var/www/phpMyAdmin-3.2.5-all-languages/scripts/create_tables.sql导入到数据库。
修改config.inc.php,去掉所有配置项的双斜杠注释

人气教程排行