You are here

function _hosting_mysql_user_requirements in Hosting 5

File

db_server/hosting_db_server.module, line 20

Code

function _hosting_mysql_user_requirements() {
  $username = HOSTING_DEFAULT_SCRIPT_USER;
  $command = <<<EOF
     mysql -uroot -pXXXXXXXXX mysql

     mysql> GRANT ALL PRIVILEGES ON *.* TO 'username_here'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
     Query OK, 0 rows affected (0.00 sec)

EOF;
  $help['title'] = t('Mysql user account capable of creating new databases.');
  $help['summary'] = t('To be able to create new sites, the provisioning framework will need to be able
     to create new databases and users. It is not recommended using the mysql root password for this,
     but any account with the correct permissions will do.');
  $help['configuration'] = t('Log in to your mysql server as root, and type in the following command:
     <pre>@command_text</pre>', array(
    '@command_text' => $command,
  ));
  return $help;
}