Quick method — DirectAdmin uses da_admin for MySQL, not root directly:

  1. Find current password:
 
   cat /usr/local/directadmin/conf/mysql.conf
  1. Change it in MySQL:
 
   mysql -uda_admin -p
   ALTER USER 'da_admin'@'localhost' IDENTIFIED BY 'new_password';
   FLUSH PRIVILEGES;
  1. Update DirectAdmin config:
 
   nano /usr/local/directadmin/conf/mysql.conf

Change the passwd= line to your new password.

If you actually need the MySQL root password (less common), it's in /usr/local/directadmin/scripts/setup.txt under mysql=.

Was this answer helpful? 11 Users Found This Useful (11 Votes)