My SQL Error with mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’localhost’ November 5, 2022 Pramod T P Leave a comment Run the following $ sudo mysql ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password by ‘mynewpassword’;