How to change the root and da_admin mysql users password
1. To change the root password, it is necessary to run the following commands:
Type:
mysql -uroot -p
Then press enter. You'll be asked for the password. Once in MySQL, type:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
Warning
Change YOURPASSWORD with the desired password
2. To change the da_admin password, it is necessary to run the following commands:
Type:
mysql -uroot -p
Then press enter. You'll be asked for the password. Once in MySQL, type:
ALTER USER 'da_admin'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
GRANT ALL PRIVILEGES ON *.* TO da_admin@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit
That should set the password for da_admin in MySQL.
Warning
Change YOURPASSWORD with the desired password
Make sure it's setup correctly for DA to use. You can edit the file from the location /usr/local/directadmin/conf/mysql.conf
and set:
user=da_admin
passwd=YOURPASSWORD
You might also need the modify the file /usr/local/directadmin/conf/my.cnf
if the file exists in the same way mysql.conf was modified.
Info
If you encounter the error "The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement" you must run the following command FLUSH PRIVILEGES;