MySQL導入數(shù)據(jù)權(quán)限問題的解決
環(huán)境:鼓搗玩的時候部署了新版zabbix的時候需要將zabbix包里的三個sql數(shù)據(jù)導入到新的mysql中,mysql版本為8.0
報錯日志:
#警告:在工作臺上展示密碼不安全----->這個無關緊要
mysql: [Warning] Using a password on the command line interface can be insecure.
#RROR 1044(42000):用戶“zabbix”@“localhost”對數(shù)據(jù)庫“zabbix”的訪問被拒絕
ERROR 1044 (42000): Access denied for user 'zabbix'@'localhost' to database 'zabbix'
排查思路
1.進入數(shù)據(jù)庫中查看:
[root@zabbix6 ~]# mysql -uroot -p11111 mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. ?Commands end with ; or \g. Your MySQL connection id is 57 Server version: 8.0.30 MySQL Community Server - GPL Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>? mysql> show databases; +--------------------+ | Database ? ? ? ? ? | +--------------------+ | information_schema | | performance_schema | +--------------------+ 2 rows in set (0.03 sec) #可以看到里面沒有我們所需要的zabbix庫,接下來創(chuàng)建zabbix庫 mysql> create databases zabbix; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'databases zabbix' at line #無法創(chuàng)建,接下來就是考慮是否是因為權(quán)限問題
2.查看mysq配置文件安全設置:
[root@zabbix6 ~]# vim /etc/my.cnf 37:skip-grant-tables #跳過表的權(quán)限驗證,用戶可以執(zhí)行增刪改查
3.重啟mysql服務
[root@zabbix6 ~]# systemctl restart mysql
4.導入數(shù)據(jù)
剩下的我們我就可以將zabbix的3個sql數(shù)據(jù)導入到mysql中
到此這篇關于MySQL導入數(shù)據(jù)權(quán)限問題的解決的文章就介紹到這了,更多相關MySQL導入數(shù)據(jù)權(quán)限問題內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
MySQL?數(shù)據(jù)庫的對庫的操作及其數(shù)據(jù)類型
這篇文章主要介紹了MySQL?數(shù)據(jù)庫的對庫的操作及其數(shù)據(jù)類型,下面文字圍繞數(shù)據(jù)庫的對庫的操作及其數(shù)據(jù)類型的相關資料展開詳細介紹,需要的小伙伴可以參考一下,希望對你有所幫助2021-12-12Mysql報Table?'mysql.user'?doesn't?exist問題的解
這篇文章主要給大家介紹了關于Mysql報Table?'mysql.user'?doesn't?exist問題的解決方法,初學者可能會遇到這個問題,文中通過圖文將解決方法介紹的非常詳細,需要的朋友可以參考下2022-05-05M1芯片安裝mysql8.0數(shù)據(jù)庫的實現(xiàn)步驟(圖文)
這篇文章主要介紹了M1芯片安裝mysql8.0數(shù)據(jù)庫的實現(xiàn)實現(xiàn)步驟,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2021-02-02