gpt4 book ai didi

windows - phpMyAdmin 配置存储未完全配置

转载 作者:可可西里 更新时间:2023-11-01 11:17:29 25 4
gpt4 key购买 nike

我已经在 Windows 上安装了 xampp 5.6.14。我打开 phpmyadmin http://localhost/phpmyadmin/

但是警告

! The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. Find out why. Or alternately go to 'Operations' tab of any database to set it up there.

! You are connected as 'root' with no password, which corresponds to the default MySQL privileged account. Your MySQL server is running with this default, is open to intrusion, and you really should fix this security hole by setting a password for user 'root'.

如何解决?

更新:我在 PMA Database ... not OK in phpMyAdmin upgrade 中看到了我的问题但我不明白。当我在 phpmyadmin 中通过 sql 查询创建内容在“create_tables.sql”中的数据库时,但出现错误

CREATE TABLE IF NOT EXISTS `pma_users` (
`username` varchar(64) NOT NULL,
`usergroup` varchar(64) NOT NULL,
PRIMARY KEY (`username`,`usergroup`)
)
COMMENT='Users and their assignments to user groups'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;

CREATE TABLE IF NOT EXISTS `pma_usergroups` (
`usergroup` varchar(64) NOT NULL,
`tab` varchar(64) NOT NULL,
`allowed` enum('Y','N') NOT NULL DEFAULT 'N',
PRIMARY KEY (`usergroup`,`tab`,`allowed`)
)
COMMENT='User groups with configured menu items'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;

CREATE TABLE IF NOT EXISTS `pma_navigationhiding` (
`username` varchar(64) NOT NULL,
`item_name` varchar(64) NOT NULL,
`item_type` varchar(64) NOT NULL,
`db_name` varchar(64) NOT NULL,
`table_name` varchar(64) NOT NULL,
PRIMARY KEY (`username`,`item_name`,`item_type`,`db_name`,`table_name`)
)
COMMENT='Hidden items of navigation tree'
DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;

错误

SQL查询:

CREATE TABLE IF NOT EXISTS pma_users ( username varchar(64) NOT NULL, usergroup varchar(64) NOT NULL, PRIMARY KEY (username,usergroup) ) COMMENT='Users and their assignments to user groups' DEFAULT CHARACTER SET utf8 COLLATE utf8_bin

MySQL said: Documentation

1046 - No database selected

最佳答案

解决windows xampp配置存储问题:

转到 localhost/phpmyadmin 中的导入选项卡

浏览 xampp\phpMyAdmin\sql 文件夹并选择 create_tables.sql

然后点击开始按钮

现在 phpmyadmin 数据库已添加到您的数据库列表中

现在我们必须为这个数据库创建用户帐户:

用户选项卡并单击添加用户

name : pma

password : pmapass

然后点击开始

为此用户的权限创建一个文件:pma_privileges.sql

具有此内容:

GRANT USAGE 
ON mysql.* TO 'pma'@'localhost';
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
(Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO 'pma'@'localhost';
GRANT
SELECT
,
INSERT,
UPDATE
,
DELETE
ON phpmyadmin.* TO 'pma'@'localhost';

并通过导入选项卡导入

现在我们创建具有特权的数据库和用户

我们必须将它们添加到 xampp\phpMyAdmin 文件夹中的 config.inc.php 文件中

所以添加这些:

    $cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';

/* 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]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$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';

现在重启mysql和浏览器,配置存储错误消失

建表时注释后的列可见

关于windows - phpMyAdmin 配置存储未完全配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33824224/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com