mysqli_real_connect() (HY0001698) Access denied for user 'root'@'localhost'
Turns out you can't use the root user in 5.7 anymore without becoming a sudoer. That means you can't just run mysql -u root anymore and have to do sudo mysql -u root instead. That also means that it will no longer work if you're using the root user in a GUI (or supposedly any non-command line application). To make it work you'll have to create a new user with the required privileges and use that instead. Login to MySQL sudo mysql -p -u root then enter the password entered during mysql installation. CREATE USER CREATE USER 'admin'@'%' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%' WITH GRANT OPTION;