You are here

INSTALL.mysql.txt in Drupal 5

Same filename and directory in other branches
  1. 4 INSTALL.mysql.txt
  2. 6 INSTALL.mysql.txt
  3. 7 INSTALL.mysql.txt
CREATE THE MySQL DATABASE
--------------------------

This step is only necessary if you don't already have a database set-up (e.g. by
your host). In the following examples, 'username' is an example MySQL user which
has the CREATE and GRANT privileges. Use the appropriate user name for your
system.

First, you must create a new database for your Drupal site (here, 'databasename'
is the name of the new database):

  mysqladmin -u username -p create databasename

MySQL will prompt for the 'username' database password and then create the
initial database files. Next you must login and set the access database rights:

  mysql -u username -p

Again, you will be asked for the 'username' database password. At the MySQL
prompt, enter following command:

  GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE
  TEMPORARY TABLES, LOCK TABLES
  ON databasename.*
  TO 'username'@'localhost' IDENTIFIED BY 'password';

where

 'databasename' is the name of your database
 'username@localhost' is the username of your MySQL account
 'password' is the password required for that username

Note: Unless your database user has all of the privileges listed above, you will
not be able to run Drupal.

If successful, MySQL will reply with:

  Query OK, 0 rows affected

To activate the new permissions, enter the following command:

  FLUSH PRIVILEGES;

File

INSTALL.mysql.txt
View source
  1. CREATE THE MySQL DATABASE
  2. --------------------------
  3. This step is only necessary if you don't already have a database set-up (e.g. by
  4. your host). In the following examples, 'username' is an example MySQL user which
  5. has the CREATE and GRANT privileges. Use the appropriate user name for your
  6. system.
  7. First, you must create a new database for your Drupal site (here, 'databasename'
  8. is the name of the new database):
  9. mysqladmin -u username -p create databasename
  10. MySQL will prompt for the 'username' database password and then create the
  11. initial database files. Next you must login and set the access database rights:
  12. mysql -u username -p
  13. Again, you will be asked for the 'username' database password. At the MySQL
  14. prompt, enter following command:
  15. GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE
  16. TEMPORARY TABLES, LOCK TABLES
  17. ON databasename.*
  18. TO 'username'@'localhost' IDENTIFIED BY 'password';
  19. where
  20. 'databasename' is the name of your database
  21. 'username@localhost' is the username of your MySQL account
  22. 'password' is the password required for that username
  23. Note: Unless your database user has all of the privileges listed above, you will
  24. not be able to run Drupal.
  25. If successful, MySQL will reply with:
  26. Query OK, 0 rows affected
  27. To activate the new permissions, enter the following command:
  28. FLUSH PRIVILEGES;