php - 如何启用 phpMyAdmin Designer View ?

标签 php phpmyadmin designer

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

Screenshot of phpMyAdmin's Designer view

如何为 phpMyAdmin 启用设计器 View ?

我已经阅读了很多关于如何为 phpMyAdmin 启用设计器 View 的教程,它们都有不同的方向,但似乎从未真正让它工作。

我使用的是 4.0.7 版

最佳答案

假设 phpMyAdmin 位于文件夹 phpMyAdmin 内,以下步骤将在 phpMyAdmin 4+ 中启用设计器:

  • 打开 phpMyAdmin/config.inc.phpphpMyAdmin/config.sample.inc.php
  • config.sample.inc.php(4.0.7 中的第 38-66 行)中找到 phpMyAdmin 配置存储设置。
  • 复制所有控制用户和存储数据库/表配置并将其粘贴到 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';

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

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

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

关于php - 如何启用 phpMyAdmin Designer View ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19166687/

相关文章:

mysql - 使用 phpMyadmin 将 mySQL 表中名称的第一个字母大写

c# - 设计时的 Windows 应用商店应用 ResourceLoader

java - 在 NetBeans IDE 6.1 中,如何在 GUI 编辑器中获取自定义 GUI 组件的图标?

javascript - 将 html <select> 选项设置为基于当前时间的默认值

php - 使用 PHP 和 MYSQL 组合字段搜索

php - 如何使用 preg_replace() 将 rel ="nofollow"添加到链接

mysql - SQL如何删除特定列的重复行并保留一个

php - 在浏览器中从mysql数据库查看pdf文件

.net - 为什么在设计器中为控件的属性指定数值会导致代码中出现 new Decimal(new int[] {... ?

php - 使用 PHP 将 JSON 数组发送到 Android Volley