如何启用phpMyAdmin的Designer视图?

Car*_*all 29 php designer phpmyadmin

我在本地运行phpMyAdmin,我正在尝试启用Designer工具.

phpMyAdmin的Designer视图的屏幕截图

如何为phpMyAdmin启用设计器视图?

我已经阅读了很多关于如何为phpMyAdmin启用Designer视图的教程,他们都有不同的方向,似乎从来没有真正让它工作.

我使用的是4.0.7版

Car*_*all 40

假设phpMyAdmin在文件夹中,以下步骤将启用phpMyAdmin 4+中的Designer phpMyAdmin:

  • 打开phpMyAdmin/config.inc.phpphpMyAdmin/config.sample.inc.php.
  • 找到phpMyAdmin配置存储设置config.sample.inc.php(4.0.7中的第38-66行).
  • 复制所有控制用户和存储db/table配置并将其粘贴到其中config.inc.php.完成后,config.inc.php应包含以下内容:

4.0.7示例:

/* change this info to whatever user has read-only access to the "mysql/user" and "mysql/db" tables */          
$cfg['Servers'][$i]['controluser']   = 'root'; //this is the default user for MAMP's mysql
$cfg['Servers'][$i]['controlpass']   = 'root'; //this is the default password for MAMP's mysql

/* this information needs to line up with the database we're about to create so don't edit it unless you plan on editing the SQL we're about to run */
$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';
Run Code Online (Sandbox Code Playgroud)

注意:我们只是告诉phpMyAdmin存储特定配置详细信息的数据库和表名.现在让我们添加数据库.

  • phpMyAdmin安装了我们生成Designer所依赖的数据库所需的SQL.我们只需要找到脚本.在4.0.7中,文件位置是phpMyAdmin/examples/create_tables.sql.或者,您可以从phpMyAdmin的github复制/下载.
  • 找到文件后,导入文件或将其复制/粘贴到SQL窗口中并在phpMyAdmin中执行.
  • 现在,一切都应该正确配置.我们需要清除cookie并重新启动浏览器.
  • 当您打开phpMyAdmin备份时,导航到特定的表,在选项卡中您应该看到Designer选项卡.

免责声明:这些说明专门基于phpMyAdmin 4+中的新文件夹结构.您可以使用phpMyAdmin的github config.sample.php 和随附的方法应用相同的指示create-table.sql.选择正确的分支选择您的phpMyAdmin版本.

  • 清除cookie似乎很重要.我清理饼干后才为我工作.谢谢! (3认同)