I found another source of information and this lead me to a working solution.
The easiest way to do this:
1. edit /etc/my.cnf, add the following
Code:
[mysqld]
skip-grant-tables
2. restart mysql
3. Run the following
Code:
mysql -u root
use mysql
UPDATE mysql.user SET Password=PASSWORD('YourPassword') WHERE USER='root' AND Host='localhost';
FLUSH PRIVILEGES;
quit
4. edit /etc/my.cnf and remove the variable added in step 1 (skip-grant-tables)
5. restart mysql
6. test login with new password
Code:
mysql -u root -h localhost -p
Password
7. Create a /root/.my.cnf
Code:
[client]
password=YourPassword
user=root
8. Change file permissions of .my.cnf
8. Test .my.cnf by logging into MySQL again
This worked for me running MySQL 5.6. on cPanel DNSOnly server.