INSTALL.mysql.txt 1.42 KB
Newer Older
1 2
// $Id$

3 4
CREATE THE MySQL DATABASE
--------------------------
5

6 7 8 9
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.
10

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

14
  mysqladmin -u username -p create databasename
15

16
MySQL will prompt for the 'username' database password and then create the
17
initial database files. Next you must log in and set the access database rights:
18

19
  mysql -u username -p
20

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

24
  GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER
25 26
  ON databasename.*
  TO 'username'@'localhost' IDENTIFIED BY 'password';
27

28
where
29

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

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

37
If successful, MySQL will reply with:
38

39
  Query OK, 0 rows affected
40

41 42 43
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.