mysqlでDBを作成しようと思っているのですが、クリエイト出来ません。
[mysql/user.MYD']が足りないのかな?と予想しているのですが、対処方法がわかりません。
どのなたか、DBのクリエイトまで問題点・懸念点のご指摘をいただけますと幸いです。
mysql 5.7.21
ruby 2.4
mysql> create database my_app; ERROR 1006 (HY000): Can't create database 'dev_my_app' (errno: 256578537)
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | +--------------------+ 1 row in set (0.00 sec)
mysql> select host, user from mysql.user; ERROR 29 (HY000): File './mysql/user.MYD' not found (Errcode: 2 - No such file or directory)
okabenoMacBook-Pro:local okabe$ mysql -v ERROR 1045 (28000): Access denied for user 'okabe'@'localhost' (using password: NO) 上記はokabeの箇所がrootで表示されるはずだと思うのですが・・
MySQLの初期設定は済んでいますか?
いえ、おそらく出来ていないと思われます。恐れ入りますが、brewでinstallした後にしなければいけない初期設定を教えていただく事は可能でしょうか?
mysql_secure_installation
Connecting to MySQL using a blank password. The 'validate_password' plugin is installed on the server. The subsequent steps will run with the existing configuration of the plugin. Please set the password for root here. New password: Re-enter new password: Estimated strength of the password: 25 Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : yes ... Failed! Error: File './mysql/user.MYD' not found (Errcode: 2 - No such file or directory)
上記の繰り返しでした。。。すみませんがお助けいただけると幸いです、、
mysql_secure_installation: [ERROR] unknown variable 'default-character-set=utf8mb4'
プレフィックスがついているのとそのエラーが出てることから何かしらの設定がされてますが、ログインユーザーはmysqlのrootではないですよね
macのマシン名でログインしているようなのです。mysqlのrootで入るいはどうしたら良いでしょうか?・・・
ちなみに mysqlコマンドはユーザーを指定しない場合 ログインユーザー名(オカベ)を取得し、ログイン等を試みます
mysql -u root -p mysql がシステム管理時に使う標準的な記述
現状、mysql -u root -p my_app でログインする事は出来ました。しかし、Access denied for user 'okabe'@'localhost' (using password: NO)になってしまいます。すでに入ってしまっているユーザーからmyslqのrootユーザに変更するにはどのような手法がありますでしょうか?質問ばかりで申し訳ございません。
su mysql -u root my_app; の様なコマンドで接続するイメージで合っていますでしょうか?
回答1件
あなたの回答
tips
プレビュー