Projet

Général

Profil

Paste
Télécharger (1,68 ko) Statistiques
| Branche: | Révision:

root / drupal7 / INSTALL.mysql.txt @ feca1e4a

1

    
2
CREATE THE MySQL DATABASE
3
--------------------------
4

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

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

    
13
  mysqladmin -u username -p create databasename
14

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

    
18
  mysql -u username -p
19

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

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

    
27
where:
28

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

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

    
39
If successful, MySQL will reply with:
40

    
41
  Query OK, 0 rows affected
42

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