Using this command
GRANT ALL PRIVILEGES ON *.* to \'brian\'@\'%\' identified by \'password\';
I try to login with:
mysql -
I had a similar problem attempting to connect to a Maria DB running on Ubuntu after upgrading to 17.04.
The default was to listen only on localhost, 127.0.0.1.
To make MySQL/Maria listen on all available ports and interfaces I needed to explicitly specify bind-address=0.0.0.0. I added this line to the end of the file /etc/mysql/my.cnf
, i.e.
...
[client-server]
# Import all .cnf files from configuration directory
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mariadb.conf.d/
bind-address=0.0.0.0
Then...
sudo /etc/init.d/mysql restart