MySQL has nothing to do with the cgi-bin. Please now, what specifically are you asking for since your posts conflict.
The cgi-bin should be located in the public_html directory of the domain (example: /home/username/domains/dummy.com/public_html/cgi-bin)
You can create it through ssh or through DirectAdmin's FileManager naming it cgi-bin.