MySQL administrator password?

Fosscape

New member
Joined
Mar 18, 2009
Messages
1
Hi. I have DirectAdmin v1.33.0 and have been having some trouble with MySQL.

I'm using PHP and it is needed for the PHP script to access a MySQL user that has the rights to create databases. it needs to be automated, it cannot be done from the DirdctAdmin page.

When I create a user in MySQL in the MySQL Management page, the user cannot create databases, or add users. Is there a way I can obtain the administrator MySQL user and password (the one that DirectAdmin uses)?

I hope you understand my request.
 
Last edited:
The user DA uses to access MySQL is "da_admin" and his password can be found in "/usr/local/directadmin/conf/mysql.conf", but I strongly suggest you don't use that access in any PHP script; instead create a dedicated user and just add the CREATE privilege.

Users "root" and "da_user" by default have the GRANT privilege, which means that they can alter any privilege and do whatever they want (included to create files in the file system or to load a shared library): this is pretty dangerous.

Use the phpMyAdmin privileges interface, it's quite user friendly.
 
Back
Top