最近、mysqlはmysql8以上で使っているのですが、ローカル環境で、dockerから起動すると、nodeサーバーから接続できないことがあって、mysqlのuser権限を変更しないと接続できないことに気づきましたので、忘れないのようにメモしておきます。
ALTER USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'userpassword'
FLUSH PRIVILEGES;
More than 3 years have passed since last update.
最近、mysqlはmysql8以上で使っているのですが、ローカル環境で、dockerから起動すると、nodeサーバーから接続できないことがあって、mysqlのuser権限を変更しないと接続できないことに気づきましたので、忘れないのようにメモしておきます。
ALTER USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'userpassword'
FLUSH PRIVILEGES;
Register as a new user and use Qiita more conveniently