INSTALL.mysql.txt 1.68 KB
Newer Older
Riccardo Padovani's avatar
Riccardo Padovani committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

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 log in 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 the following command:

23 24
  GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER,
  CREATE TEMPORARY TABLES ON databasename.*
Riccardo Padovani's avatar
Riccardo Padovani committed
25 26
  TO 'username'@'localhost' IDENTIFIED BY 'password';

27
where:
Riccardo Padovani's avatar
Riccardo Padovani committed
28 29

 'databasename' is the name of your database
30 31
 'username' is the username of your MySQL account
 'localhost' is the web server host where Drupal is installed
Riccardo Padovani's avatar
Riccardo Padovani committed
32 33
 'password' is the password required for that username

34 35 36 37
Note: Unless the database user/host combination for your Drupal installation
has all of the privileges listed above (except possibly CREATE TEMPORARY TABLES,
which is currently only used by Drupal core automated tests and some
contributed modules), you will not be able to install or run Drupal.
Riccardo Padovani's avatar
Riccardo Padovani committed
38 39 40 41 42 43 44 45

If successful, MySQL will reply with:

  Query OK, 0 rows affected

If the InnoDB storage engine is available, it will be used for all database
tables. InnoDB provides features over MyISAM such as transaction support,
row-level locks, and consistent non-locking reads.