Help us understand the problem. What is going on with this article?

MySQL(5.7)メモ

More than 3 years have passed since last update.

MACにbrewでMySQLを入れてみた

$ brew update
$ brew install mysql
$ brew info mysql

mysql: stable 5.7.17 (bottled)

validate_password

mysqlを入れるとvalidate_passwordgaが入っている。

確認

mysql> SHOW GLOBAL VARIABLES LIKE 'validate%';

変更

mysql> SET GLOBAL validate_password_length=4;
mysql> SET GLOBAL validate_password_policy=LOW;

confで設定

mysql.server startの度にリセットされるみたいなので、 /etc/my.confを修正する。

/etc/my.conf
[mysqld]
validate_password_length=4
validate_password_policy=LOW

rootのパスワードをなしにする

mysql> update user set authentication_string='' where User='root';

アンインストールvalidate_password

mysql> UNINSTALL PLUGIN validate_password;

インストールvalidate_password

mysql> INSTALL PLUGIN validate_password SONAME 'validate_password.so';

GRANT ON で権限操作の際にERROR 1819

これまでだったらこれでも良かった記憶

mysql> GRANT select,update,insert,delete ON db_name.table_name TO 'user'@'%';

しかし Your password does not satisfy the current policy requirements

mysql> GRANT select,update,insert,delete ON db_name.table_name TO 'user'@'%' IDENTIFIED BY 'password';

IDENTIFIEDで対象のuserのパスワードを指定する必要があるみたい。

LaravelのBD設定

configのdatabase.phpでunix_socket情報の追加が必要になってた

[PDOException]
SQLSTATE[HY000] [2002] No such file or directory

こんなエラーがでてしまう

mysqladmin version
Server version      5.7.17
Protocol version    10
Connection      Localhost via UNIX socket
UNIX socket     *** <- これ
Uptime:         2 days 2 hours 40 min 57 sec
cilly
nightley-inc
人や物の位置や動きのデータを解析し、価値ある情報をクライアントへ届ける位置情報プラットフォームを開発・運営しているスタートアップです。
https://nightley.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした