PHP-Login icon indicating copy to clipboard operation
PHP-Login copied to clipboard

Solution to authentication problem MySQL 8

Open samuelsylvander opened this issue 6 years ago • 0 comments

I had problems installing the package on my Mojave machine with MySQL 8 due to new authentication model.

Solved it by doing the following:

  1. Edited the my. file and added the following: [mysqld] default-authentication-plugin=mysql_native_password

  2. Run the following commands in MySQL CREATE USER 'admin'@'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpass'; GRANT ALL PRIVILEGES ON . TO 'admin'@'localhost' WITH GRANT OPTION; CREATE USER 'admin'@'%' IDENTIFIED WITH mysql_native_password BY 'yourpass'; GRANT ALL PRIVILEGES ON . TO 'admin'@'%' WITH GRANT OPTION;

CREATE DATABASE IF NOT EXISTS yourdb COLLATE 'utf8_general_ci' ; GRANT ALL ON yourdb.* TO 'admin'@'%' ; FLUSH PRIVILEGES ;

  1. Re-Started MySQL
  2. Run the installer

Reason bug: Default authenticate of MySQL 8.0.4 changed. Refer to detail information: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-4.html at Security Notes

samuelsylvander avatar Dec 28 '18 09:12 samuelsylvander