Quick method — DirectAdmin uses da_admin for MySQL, not root directly:
- Find current password:
cat /usr/local/directadmin/conf/mysql.conf
- Change it in MySQL:
mysql -uda_admin -p
ALTER USER 'da_admin'@'localhost' IDENTIFIED BY 'new_password';
FLUSH PRIVILEGES;
- 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=.