<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                你如果用默認的mysql客戶端登陸,可能就會有這個報錯 ~~~ mysql -uroot -p123 -P3308 -S /tmp/mysql80.sock mysql: [Warning] Using a password on the command line interface can be insecure. ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: / ~~~ 在mysql5.7環境里,雖然可以設置default_authentication_plugin來改變認證加密方式,但是一般人不會去設置.在mysql8.0下,默認變成了default_authentication_plugin=caching_sha2_password,包括你剛初始化的root用戶也是這個認證加密方式,這樣的結果是讓你除非用新的協議驅動,例如必須用8.0自帶的mysql客戶端才行,不然就連接不上數據庫.這樣就必然造成不兼容的情況,幸好,是可以改回舊的方式的. vim my.cnf ~~~ [mysqld] default_authentication_plugin=mysql_native_password ~~~ 但是,這個參數只對新授權的用戶生效,舊的root密碼還是用舊的方式,類似下面這樣 ~~~ use mysql; #查看各用戶情況 mysql> select Host,User,plugin,authentication_string from mysql.user; +-----------+------------------+-----------------------+------------------------------------------------------------------------+ | Host | User | plugin | authentication_string | +-----------+------------------+-----------------------+------------------------------------------------------------------------+ | localhost | mysql.infoschema | mysql_native_password | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | | localhost | mysql.session | mysql_native_password | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | | localhost | mysql.sys | mysql_native_password | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | | localhost | root | caching_sha2_password | $A$005$.Sf}Q/Jh>3b6CjI5/vMJVDIQbS1dbFWaCVuiby7aX3ZY4lB6/M7Vvny5DUA | +-----------+------------------+-----------------------+------------------------------------------------------------------------+ 4 rows in set (0.00 sec) ~~~ 可以看到plugin是不一樣的,密碼的加密方式也很明顯不一致造成差異. 修改用戶密碼,在MySQL中執行命令: ~~~ ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '新密碼'; ~~~ 管理員root的host是localhost,代表僅限localhost登錄訪問。如果要允許開放其他ip登錄,則需要添加新的host。如果要允許所有ip訪問,可以直接修改成“%” 授權 上面說了創建一個用戶,在mysql8.0創建用戶和授權和之前不太一樣.其實也不能說不一樣,而是說更嚴格,需要先創建用戶和設置密碼,然后才能授權. ~~~ #先創建一個用戶 create user 'sroot'@'%' identified by '123123'; #再進行授權 grant all privileges on *.* to 'sroot'@'%' with grant option; ~~~ 如果按以前的方式來做,那就會報語法錯誤 ~~~ grant all privileges on *.* to 'sroot'@'%' identified by '123123'; 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 'identified by '123123'' at line 1 ~~~ 所以授權用戶要注意方法了 查看用戶權限 ~~~ show grants for 'sroot'@'%'; ~~~ 還有個錯誤 ~~~ ERROR! The server quit without updating PID file (/usr/local/var/mysql/chenyuntekiMacBook-Air.local ~~~ 在Mac上通過brew install mysql 安裝了完mysql 執行mysql.server start 報錯:ERROR! The server quit without updating PID file (/usr/local/var/mysql/chenyuntekiMacBook-Air.local.pid). ~~~ nano /usr/local/var/mysql/chenyuntekiMacBook-Air.local.err ~~~ 查看錯誤信息發現:The error means mysqld does not have the access rights to the directory 猜測是文件權限的問題 ~~~ 執行:chmod -R 777 /usr/local/var/mysql/ ~~~ Google了下 ,問題可能的原因有多種,具體什么原因最好的辦法是先查看下錯誤日志: 1、可能是/usr/local/mysql/data/mysql.pid文件沒有寫的權限 解決方法 :給予權限,執行 “chown -R mysql:mysql /var/data” “chmod -R 755 /usr/local/mysql/data” 然后重新啟動mysqld! 2、可能進程里已經存在mysql進程 解決方法:用命令“ps -ef|grep mysqld”查看是否有mysqld進程,如果有使用“kill -9 進程號”殺死,然后重新啟動mysqld! 3、可能是第二次在機器上安裝mysql,有殘余數據影響了服務的啟動。 解決方法:去mysql的數據目錄/data看看,如果存在mysql-bin.index,就趕快把它刪除掉吧,它就是罪魁禍首了! 4、mysql在啟動時沒有指定配置文件時會使用/etc/my.cnf配置文件,請打開這個文件查看在[mysqld]節下有沒有指定數據目錄(datadir)。 解決方法:請在[mysqld]下設置這一行:datadir = /usr/local/mysql/data 5、skip-federated字段問題 解決方法:檢查一下/etc/my.cnf文件中有沒有沒被注釋掉的skip-federated字段,如果有就立即注釋掉吧。 6、錯誤日志目錄不存在 解決方法:使用“chown” “chmod”命令賦予mysql所有者及權限 7、selinux惹的禍,如果是centos系統,默認會開啟selinux 解決方法:關閉它,打開/etc/selinux/config,把SELINUX=enforcing改為SELINUX=disabled后存盤退出重啟機器試試。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看