遠程登錄Linux(Ubuntu)環境下的mysql 時,如果直接在工具中創建數據庫,會出現
1044-Access denied for user 'root'@'%' to database 'lc_db' 錯誤
1.原因:遠程登錄,創建數據庫時,出現權限不足!
方案:
#Linux 中登錄mysql mysql -urrot -p123456 #zks_zl_test_db要創建的數據庫名稱,創建數據庫的賬戶root, 密碼123456 grant all privileges on zks_zl_test_db.* to 'root'@'%' identified by '123456' with grant option;
2.權限賦值完畢就可以針對zks_zl_test_db進行創建和表的操作了!