ERROR 1698 (28000): Access denied for user ‘root’@’localhost’

ERROR 1698 (28000): Access denied for user ‘root’@’localhost’ started showing up with the system upgrade to Ubuntu 15 and MariaDB.

Fixes are described at

http://superuser.com/questions/957708/mysql-mariadb-error-1698-28000-access-denied-for-user-rootlocalhost/963968

http://superuser.com/questions/949496/cant-reset-mysql-mariadb-root-password

However, there’s a way to preserve the additional security provided by this unix_socket plugin. Instead of connecting via TCP/IP, connect via the socket.

The location of the socket file on Ubuntu is /var/run/mysqld/mysqld.sock. Use this path in your connection settings in MySQL Workbench. Then, restart the application as root:

sudo mysql-workbench

You run it as root, and it can then connect to the database, as a Unix root user, logging in as a database root user.

This won’t work across two computers, of course.