简体   繁体   English

配置文件中的PhpMyAdmin错误

[英]PhpMyAdmin error with config file

Errors are: 错误是:

The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. phpMyAdmin配置存储未完全配置,某些扩展功能已停用。 To find out why click here. 要找出原因,请点击此处。
Server running with Suhosin. 与Suhosin一起运行的服务器。 Please refer to documentation for possible issues. 有关可能的问题,请参阅文档。

$cfg['Servers'][$i]['pmadb'] ... OK $ cfg ['Servers'] [$ i] ['pmadb'] ......好的

$cfg['Servers'][$i]['relation'] ... not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['relation'] ...不行[文档]
General relation features: Disabled 一般关系特征:已禁用

$cfg['Servers'][$i]['table_info'] ... not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['table_info'] ...不行[文档]
Display Features: Disabled 显示功能:已禁用

$cfg['Servers'][$i]['table_coords'] ... not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['table_coords'] ...不行[文档]

$cfg['Servers'][$i]['pdf_pages'] ... not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['pdf_pages'] ...不行[文档]
Creation of PDFs: Disabled 创建PDF:禁用

$cfg['Servers'][$i]['column_info'] ...not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['column_info'] ...不行[文档]
Displaying Column Comments: Disabled 显示列注释:已禁用
Browser transformation: Disabled 浏览器转换:已禁用

$cfg['Servers'][$i]['bookmarktable'] ... not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['bookmarktable'] ...不行[文档]
Bookmarked SQL query: Disabled 已添加书签的SQL查询:已禁用

$cfg['Servers'][$i]['history'] ...not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['history'] ...不行[文档]
SQL history: Disabled SQL历史记录:已禁用

$cfg['Servers'][$i]['designer_coords'] ... not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['designer_coords'] ...不行[文档]
Designer: Disabled 设计师:已禁用

$cfg['Servers'][$i]['tracking'] ... not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['tracking'] ...不行[文档]
Tracking: Disabled 跟踪:已禁用

$cfg['Servers'][$i]['userconfig'] ... not OK [ Documentation ] $ cfg ['Servers'] [$ i] ['userconfig'] ...不行[文档]
User preferences: Disabled 用户首选项:已禁用

My config.inc.php file is as follows: 我的config.inc.php文件如下:

/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * phpMyAdmin sample configuration, you can use it as base for
 * manual configuration. For easier setup you can use setup/
 *
 * All directives are explained in Documentation.html and on phpMyAdmin
 * wiki <http://wiki.phpmyadmin.net>.
 *
 * @package phpMyAdmin
 */

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'myblowfishpass';

/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

/*
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
 $cfg['Servers'][$i]['controluser'] = 'dave1';
 $cfg['Servers'][$i]['controlpass'] = 'mypassword';

/* Storage database and tables */
 $cfg['Servers'][$i]['pmadb'] = 'wordpress_db'; //the name of my db table
 $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; //does the pma_ need to change to dave1_?
 $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]['tracking'] = 'pma_tracking';
 $cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
 $cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
/* Contrib / Swekey authentication */
 $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

/**
 * Defines whether a user should be displayed a "show all (records)"
 * button in browse mode or not.
 * default = false
 */
  $cfg['ShowAll'] = true;

/**
 * Number of rows displayed when browsing a result set. If the result
 * set contains more rows, "Previous" and "Next".
 * default = 30
 */
  $cfg['MaxRows'] = 50;

/**
 * Use graphically less intense menu tabs
 * default = false
 */
//$cfg['LightTabs'] = true;

/**
 * disallow editing of binary fields
 * valid values are:
 *   false  allow editing
 *   'blob' allow editing except for BLOB fields
 *   'all'  disallow editing
 * default = blob
 */
//$cfg['ProtectBinary'] = 'false';

/**
 * Default language to use, if not browser-defined or user-defined
 * (you find all languages in the locale folder)
 * uncomment the desired line:
 * default = 'en'
 */
  $cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';

/**
 * default display direction (horizontal|vertical|horizontalflipped)
 */
//$cfg['DefaultDisplay'] = 'vertical';


/**
 * How many columns should be used for table display of a database?
 * (a value larger than 1 results in some information being hidden)
 * default = 1
 */
//$cfg['PropertiesNumColumns'] = 2;

/**
 * Set to true if you want DB-based query history.If false, this utilizes
 * JS-routines to display query history (lost by window close)
 *
 * This requires configuration storage enabled, see above.
 * default = false
 */
//$cfg['QueryHistoryDB'] = true;

/**
 * When using DB-based query history, how many entries should be kept?
 *
 * default = 25
 */
//$cfg['QueryHistoryMax'] = 100;

/*
 * You can find more configuration options in Documentation.html
 * or here: http://wiki.phpmyadmin.net/pma/Config
 */

I too had this same problem. 我也有同样的问题。 clearing cookies and cache worked for me. 清除cookie和缓存为我工作。 try it 试试吧

If you are using "create_tables.sql" to create the database and tables, change the tables name pma__ to pma_ . 如果使用“create_tables.sql”创建数据库和表,请将表名pma__更改为pma_ (change 2 underscore to 1 underscore) (将2下划线更改为1下划线)

Or change the tables name in "config.inc.php", pma_ to pma__ (change 1 underscore to 2 underscore). 或在“config.inc.php中”更改表名, pma_pma__ (换1下划线2下划线)。
For example, pma_bookmark to pma__bookmark 例如, pma_bookmarkpma__bookmark

$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]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';

VestaCP Team made and successfully tested error fixer for phpMyAdmin (no more annoying message "The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated"). VestaCP团队为phpMyAdmin制作并成功测试了错误修复程序(没有更烦人的消息“phpMyAdmin配置存储未完全配置,某些扩展功能已被停用”)。 We hope that fix will be useful and will help users. 我们希望修复程序有用,并将帮助用户。

Page on Github: https://github.com/skurudo/phpmyadmin-fixer Github上的页面: https//github.com/skurudo/phpmyadmin-fixer

What the script does: 脚本的作用:

  • works from user root; 从用户root工作;
  • changes inside /etc/phpmyadmin/config.inc.php, fixes value; 更改/etc/phpmyadmin/config.inc.php中的更改,修复值;
  • makes a backup of /etc/phpmyadmin/config.inc.php in /root folder; 在/ root文件夹中备份/etc/phpmyadmin/config.inc.php; adds in a mysql pma user / and the table phpmyadmin (if the user "pma" or the table "phpmyadmin" already exists, the script will delete those!); 添加一个mysql pma用户/和表phpmyadmin(如果用户“pma”或表“phpmyadmin”已经存在,脚本将删除那些!);
  • download and add table for database phpmyadmin; 下载并添加数据库phpmyadmin的表;
  • clean temp files, leftover pma.txt (contains password for pma@localhost) and old config; 清理临时文件,剩余的pma.txt(包含pma @ localhost的密码)和旧配置;
$cfg['Servers'][$i]['user'] = 'root'; //mysql username here
$cfg['Servers'][$i]['password'] = 'password'; //mysql password here

Try adding the above configuration lines after $cfg['Servers'][$i]['connect_type'] = 'tcp'; 尝试在$cfg['Servers'][$i]['connect_type'] = 'tcp';之后添加上述配置行$cfg['Servers'][$i]['connect_type'] = 'tcp';

If these also doesn't work then try with a fresh configuration file, may be by copying config.sample.inc.php . 如果这些也不起作用,那么尝试使用新的配置文件,可以通过复制config.sample.inc.php Do ensure that it has the above mentioned configuration lines. 确保它具有上述配置行。 Check that if it works fine and then start making changes to it step by step, if any changes are to be made.. 检查它是否正常工作,然后逐步开始对其进行更改,如果要进行任何更改。

Please note that the username and password you provide should be able to login you from mysql command prompt.. 请注意,您提供的用户名和密码应该能够从mysql命令提示符登录。

Please follow these steps : 请按以下步骤操作:

  1. Create a database named phpmyadmin Import database sql/create_tables.sql 创建名为phpmyadmin的数据库导入数据库sql / create_tables.sql
  2. Create a user and Grant access for a user to that database (GRANT ALL PRIVILEGES ON phpmyadmin.* TO user@'localhost' IDENTIFIED BY 'password';) 创建用户并授予用户访问该数据库的权限(在phpmyadmin上授予所有权限。*到用户@'localhost'IDENTIFIED BY'密码';)
  3. Locate and edit your config file, enable these lines in your config.inc.php (remove # in front of each lines) 找到并编辑配置文件,在config.inc.php中启用这些行(删除每行前面的#)

     /* User used to manipulate with storage */ $cfg['Servers'][$i]['controlhost'] = 'localhost'; $cfg['Servers'][$i]['controluser'] = 'phpmyadmin_pma'; $cfg['Servers'][$i]['controlpass'] = 'yourpassword'; /* Storage database and tables */ $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'; /* These lines I added-in because they are not exist in the config_sample.inc.php */ $cfg['Servers'][$i]['favorite'] = 'pma__favorite'; $cfg['Servers'][$i]['users'] = 'pma__users'; $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups'; $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding'; $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches'; $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns'; $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings'; $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates'; 

Please note there are two underscores in between pma__ , you need to make sure it is matched the table name in your database 请注意,pma__之间有两个下划线,您需要确保它与数据库中的表名匹配

IF you see this error: $cfg['Servers'][$i]['userconfig'] ... not OK [ Documentation ] User preferences: Disabled 如果您看到此错误:$ cfg ['Servers'] [$ i] ['userconfig'] ... not OK [文档]用户首选项:已禁用

That means your configuration setting is not matched the table's name, or... your user does not have access to the database. 这意味着您的配置设置与表的名称不匹配,或者......您的用户无权访问数据库。

Right in the error page, if you scroll down to the bottom. 如果向下滚动到底部,则在错误页面中。 There is a tip telling you to log out and log in again. 有一个提示告诉您注销并再次登录。 Doing this will work 这样做会有效

to correct the error, click on the message, after that on top you can si link create, click on create and refresh. 要更正错误,请单击该消息,然后在顶部您可以链接创建,单击创建和刷新。 this solution work with me. 这个解决方案适合我。

1) Check if you have phpmyadmin database in your mysql server. 1)检查你的mysql服务器中是否有phpmyadmin数据库。 Phpmyadmin helps you create its database. Phpmyadmin可以帮助您创建数据库。

2) Check if you have pma user. 2)检查你是否有pma用户。 If not create it: 如果没有创建它:

CREATE USER  'pma'@'localhost' IDENTIFIED BY 'yourPassword';

The pma password must be the same as the one given in config.inc.php pma密码必须与config.inc.php中给出的密码相同

3) Give privileges to pma: 3)给pma授予权限:

GRANT ALL PRIVILEGES ON phpmyadmin.* TO `pma`@`localhost` WITH GRANT OPTION;
FLUSH PRIVILEGES;

4) Clear cache and cookies. 4)清除缓存和cookie。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM