Run a command line script in php

I have made a user in MySQL command-line but it doesn’t have the priviledge to create a database. I know the code to set the priviledge (command-line) but it would just be annoying if I had to do that for every database I create. So is there some way I could write that script in pphp so that I wouldn’t have to always go to the command-line?

http://php.net/manual/en/function.exec.php

OR

http://www.php.net/manual/en/function.system.php

Sponsor our Newsletter | Privacy Policy | Terms of Service