#author("2020-09-13T13:50:40+00:00","default:src128","src128") &tag(MySQL8); *目次 [#n451abf1] #contents *関連ページ [#o3976052] *参考情報 [#fc93aae4] *トラブルシューティング [#e0e84702] **「grant all privileges」でエラー [#l935e464] -MySQL 8ではcreate userしてからgrantしないとだめらしい。 -[[How to grant all privileges to root user in MySQL 8.0 - Stack Overflow:https://stackoverflow.com/questions/50177216/how-to-grant-all-privileges-to-root-user-in-mysql-8-0]] #pre{{ mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'root'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; }} **unknown variable 'validate_password.policy=LOW'が表示される [#t420709a] -どうやらvalidate_password componentが有効でないとこのエラーが表示されるらしい。[[MySQL :: MySQL 8.0 Reference Manual :: 6.4.3.3 Transitioning to the Password Validation Component:https://dev.mysql.com/doc/refman/8.0/en/validate-password-transitioning.html]] -以下のコマンドで確認できる。[[MySQL8.0 小ネタ集 | スマートスタイル TECH BLOG|データベース&クラウドの最新技術情報を配信:https://www.s-style.co.jp/blog/2018/07/2106/]] SELECT * FROM mysql.component; -CentOS 8ではデフォルトでvalidate_passwordコンポーネントが有効だが、macportsでは無効?(要確認)。 **リモートから接続できない [#l5d6c2e6] -skip-networking、bind-addressの設定を確認する。以下はリモートアクセスを許可する設定。 #pre{{ bind-address=0.0.0.0 skip-networking=0 }} -現在の設定はこれで確認できる。 $ mysql -b -e "SHOW GLOBAL VARIABLES like 'bind_address'" -それでもだめな場合ユーザー(rootなど)のアクセス許可がlocalhostに限定されているせいかもしれない。 select user,host from mysql.user; | root | localhost | -以下で作成する。 create user root@'%' identified by 'hogehoge'; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION; **mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces [#he9ca9a4] -[[mysqldumpでPROCESS権限(PROCESS privilege)を要求される - いっさいがっさい:https://isgs-lab.com/424/]] -以下を実行。 mysql > GRANT PROCESS ON *.* TO "your-user";