navicat premium使用Root用戶鏈接上mysql後只能看到information_schema庫mysql
這是權限不足致使的,儘管是用root帳戶登陸,navicat登陸至關因而遠程ip登陸數據庫,仍會出現權限不足只能看到information_schema臨時庫。sql
鏈接測試沒有問題:數據庫
打開鏈接:只能看到information_schema庫測試
-- 1.root用戶登錄系統:spa
mysql -u root -p mysqlorm
-- 2.切換數據庫:blog
use mysql;ip
-- 3.查看user表中root用戶的權限:ci
select * from user where user='root';rem
如圖:輸入數字ip地址的權限都爲N。
-- 4.在顯示的列表中顯示:root用戶的host爲'192.168.*.*'的權限都是'N',表示root用戶host爲'192.168.*.*'的登錄不具備權限
-- 5.修改root用戶的host爲'192.168.*.*'的權限:
update user set `Select_priv` = 'Y', `Insert_priv` = 'Y', `Update_priv` = 'Y', `Delete_priv` = 'Y', `Create_priv` = 'Y', `Drop_priv` = 'Y', `Reload_priv` = 'Y', `Shutdown_priv` = 'Y', `Process_priv` = 'Y', `File_priv` = 'Y', `Grant_priv` = 'Y', `References_priv` = 'Y', `Index_priv` = 'Y', `Alter_priv` = 'Y', `Show_db_priv` = 'Y', `Super_priv` = 'Y', `Create_tmp_table_priv` = 'Y', `Lock_tables_priv` = 'Y', `Execute_priv` = 'Y', `Repl_slave_priv` = 'Y', `Repl_client_priv` = 'Y', `Create_view_priv` = 'Y', `Show_view_priv` = 'Y', `Create_routine_priv` = 'Y', `Alter_routine_priv` = 'Y', `Create_user_priv` = 'Y', `Event_priv` = 'Y', `Trigger_priv` = 'Y', `Create_tablespace_priv` = 'Y' where user='root' and host='192.168.*.*' |
-- 6.更新一下:
flush privileges;
-- 7.而後從新啓動下mysql,能夠解決問題了
如圖: