1.登录phpmyadmin,点击导入,选择/var/ww/html/phpmyadmin/examples/create_tables.sql并执行

完成后可以看到多出了一个库phpmyadmin。

2.编辑/var/www/html/phpmyadmin/config.inc.php文件(如果没有,就复制一份config.simple.inc.php),并取消以下项目的注释(库名和表名对应):
$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]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
3.在phpmyadmin中选择phpmyadmin库,并执行以下sql语句

GRANT USAGE ON mysql.* TO '用户名@localhost' IDENTIFIED BY '密码';
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 '用户名@localhost';
GRANT SELECT ON mysql.db TO '用户名@localhost';
GRANT SELECT ON mysql.host TO '用户名@localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO '用户名@localhost';

4.重新登录phpmyadmin

最新文章

  1. 简直要逆天!超炫的 HTML5 粒子效果进度条
  2. Percona-Xtrabackup 2.3.3 慢查询依旧堵塞MariaDB备份(三)
  3. [Security] Automatically adding CSRF tokens to ajax calls when using jQuery--转
  4. oracle数据库入门sql语句
  5. hdu2044java
  6. mysql 参数:[read_buffer_size] [sort_buffer_size] [read_rnd_buffer_size] [tmp_table_size]---图解
  7. DDoS攻击
  8. iphone 6s pp助手 越狱
  9. ajaxFileUpload用法
  10. springMVC中一个class中的多个方法
  11. 《C++反汇编与逆向分析技术揭秘》——观察各种表达式的求值过程
  12. HDU 3785 寻找大富翁
  13. 项目swift的一些问题
  14. [最短路]P1078 文化之旅
  15. Hadoop源码分析之FileSystem抽象文件系统
  16. ROS----TUT-RIM协作机器人和Actin-ROS接口
  17. C#消息队列(RabbitMQ)零基础从入门到实战演练
  18. struts框架值栈问题三之值栈的创建和ActionContext对象的关系
  19. Java 阻塞
  20. POJ题目分类推荐 (很好很有层次感)

热门文章

  1. 如何解决 “the specified service is marked as deletion”
  2. pat1008. Elevator (20)
  3. log4j.properties 日志分析
  4. python3.4中自定义wsgi函数,make_server函数报错问题
  5. DBCP数据库连接池原理分析
  6. 如何修改eclipse的web项目默认浏览器
  7. CSS知识点梳理
  8. extjs 6
  9. better-scroll 遇到的问题 2
  10. 切图让我进步!关于white-space属性的组合拳