Error with mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’localhost’

Run the following

$ sudo mysql

ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password by ‘mynewpassword’;

Leave a Reply

Your email address will not be published. Required fields are marked *