Scripting to add Hosts to mysql

FastAttack

Verified User
Joined
Dec 27, 2004
Messages
51
I don't want to bug the support team on how to build a script for directadmin. So I will ask you guys :


long story short , mysql is now on a seperate server, and DA controls it perfectly.

The problem is , that it does not add the valid host to the msyql user. Causing Access denied when a client tries to use it. to Prevent this they have to add the host 192.168.0.1 by hand.

I contacted DA support and this is what they said:

Hello,

Try using the database_create_post.sh and database_user_create_post.sh
http://www.directadmin.com/features.php?id=463

And add the accesshosts via the scripts. (/usr/local/directadmin/scripts/custom/*)..
DA calls these scripts after the database and user are created.
Note that you may need to open your sql commands with FLUSH PRIVILEGES as DA runs that command after the script is run..

Thank you,


now I go to the folder for these custom scripts and there is nothing currently in there.

So does that mean I have to create it ?

and If I do what is the call funciton to create a host to the mysql user?

or is the function similar to adding a host via the mysql client via SSH?

I know scripting but this would be the first time on me creating something custom for DA.

thanks!
 
Back
Top