Creating the Drupal Database and Database User
Last modified: February 19, 2008 - 03:55
Now that MySQL is installed and we have a root password established for it, it's time to create the database that Drupal will use:
$ mysqladmin -u root -p create drupal
Enter password: zoinksThe database was created. Time to create the user. The user in this example will be called drupaldbuser and the password for that user will be fuffy.
$ mysql -u root -p
Enter password: zoinks
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15 to server version: 4.1.11-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT ALL PRIVILEGES ON drupal.* TO drupaldbuser@localhost IDENTIFIED BY 'fuffy';
Query OK, 0 rows affected (0.04 sec)If you are using MySQL 4.1 or later, the following command is necessary because Tiger comes with PHP 4, and the MySQL libraries for PHP 4 use a different authentication protocol.
mysql> SET PASSWORD FOR 'drupaldbuser'@'localhost' = OLD_PASSWORD('fuffy');
Query OK, 0 rows affected (0.00 sec)Now we apply the new settings:
mysql> flush privileges;
Query OK, 0 rows affected (0.19 sec)
mysql> \q
ByeNow I paused to rejoice. MySQL was installed and ready for Drupal. Now it was time to install Drupal itself.
