use mysql; update user set host='%' where user='root' and host <>'localhost'; flush privileges;
谢谢楼上,但管理员不能随便开放给别人,只能使用别的用户。关键是phpMyAdmin的设置问题
无非是host 、user和password的问题,你config.inc.php设置正确了么?
use mysql; update user set host='%' where user='root' and host <>'localhost'; flush privileges; ------------------------------------------------ 这里不是说了吗
具体看看这段 * For 'HTTP' and 'cookie' modes, phpMyAdmin needs a controluser that has only the SELECT privilege on the mysql.user (all columns except "Password"), mysql.db (all columns), mysql.host (all columns) and mysql.tables_priv (all columns except "Grantor" & "Timestamp") tables. You must specify the details for the controluser in the config.inc.php file under the $cfg['Servers'][$i]['controluser']& $cfg['Servers'][$i]['controlpass'] settings. The following example assumes you want to use pma as the controluser and pmapass as the controlpass, but this is only an example: use something else in your file! Of course you have to replace localhost by the webserver's host if it's not the same as the MySQL server's one.
问题解决,问题所在 1、建立了任意用户登录 2、为用户分配权限不正确 下面可以作为参考,谢谢楼上各位 GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass'; 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 ON mysql.host TO 'pma'@'localhost'; GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv) ON mysql.tables_priv TO 'pma'@'localhost';
update user set host='%' where user='root' and host <>'localhost';
flush privileges;
update user set host='%' where user='root' and host <>'localhost';
flush privileges;
------------------------------------------------
这里不是说了吗
has only the SELECT privilege on the mysql.user (all columns
except "Password"), mysql.db (all columns), mysql.host (all
columns) and mysql.tables_priv (all columns except "Grantor" &
"Timestamp") tables.
You must specify the details for the controluser in the
config.inc.php file under the $cfg['Servers'][$i]['controluser']&
$cfg['Servers'][$i]['controlpass'] settings.
The following example assumes you want to use pma as the
controluser and pmapass as the controlpass, but this is only an
example: use something else in your file!
Of course you have to replace localhost by the webserver's host if
it's not the same as the MySQL server's one.
1、建立了任意用户登录
2、为用户分配权限不正确
下面可以作为参考,谢谢楼上各位
GRANT USAGE ON mysql.* TO 'pma'@'localhost' IDENTIFIED BY 'pmapass';
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 ON mysql.host TO 'pma'@'localhost';
GRANT SELECT (Host, Db, User, Table_name, Table_priv, Column_priv)
ON mysql.tables_priv TO 'pma'@'localhost';