What is the MySQL root password in DirectAdmin?
You can find the MySQL root password in two locations on DirectAdmin installations. You can find it at /usr/local/directadmin/conf/mysql.conf and the format will be as follows:
host=passwd=mysqlpasswordport=0socket=/var/lib/mysql/mysql.sockuser=da_adminYou can also find it in your DirectAdmin setup file located at /usr/local/directadmin/conf/setup.txt. The format will be as follows:
adminname=adminadminpass=adminpasswordemail=admin@server-host.da.directhostname=server-hostname.da.directip=server-ipmysql=mysqlpasswordns1=ns1.server-hostname.da.directns2=ns2.server-hostname.da.directIn both cases the MySQL username is da_admin.
Accessing MySQL
Section titled “Accessing MySQL”You can access MySQL using the da_admin user and the password found in the configuration files above. For example:
mysql -u da_admin -pYou will be prompted to enter the password.
Alternatively, you can store the password in a MySQL configuration file ~/.my.cnf to avoid being prompted. You should add the following to the file:
[client]user=da_adminpassword=mysqlpasswordAfter creating this file, you can connect to MySQL without being prompted by just running mysql.