New Ubuntu 16 server with MariaDB.
Tried using
“`SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘myGreatPassword’);
Password is changed but could not connect to DB from PHP.
Needed to update mysql.user table and set the Plugin field to an empty value (rather than unix_socket)!