Issue #336483 by brianV, catch: Fixed Performance: SELECT MAX(comment_count()) FROM...
[project/drupal.git] / INSTALL.mysql.txt
CommitLineData
924dda1f 1
6ce212e4
DB
2CREATE THE MySQL DATABASE
3--------------------------
924dda1f 4
25a4309e
DB
5This step is only necessary if you don't already have a database set up (e.g.,
6by your host). In the following examples, 'username' is an example MySQL user
7which has the CREATE and GRANT privileges. Use the appropriate user name for
8your system.
b1b1e204 9
6ce212e4
DB
10First, you must create a new database for your Drupal site (here, 'databasename'
11is the name of the new database):
924dda1f 12
6ce212e4 13 mysqladmin -u username -p create databasename
924dda1f 14
6ce212e4 15MySQL will prompt for the 'username' database password and then create the
69ed7f66 16initial database files. Next you must log in and set the access database rights:
924dda1f 17
6ce212e4 18 mysql -u username -p
924dda1f 19
6ce212e4 20Again, you will be asked for the 'username' database password. At the MySQL
ab4c4456 21prompt, enter the following command:
924dda1f 22
480a2daf 23 GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER
6ce212e4
DB
24 ON databasename.*
25 TO 'username'@'localhost' IDENTIFIED BY 'password';
924dda1f 26
6ce212e4 27where
924dda1f 28
6ce212e4
DB
29 'databasename' is the name of your database
30 'username@localhost' is the username of your MySQL account
31 'password' is the password required for that username
924dda1f 32
6ce212e4
DB
33Note: Unless your database user has all of the privileges listed above, you will
34not be able to run Drupal.
924dda1f 35
6ce212e4 36If successful, MySQL will reply with:
924dda1f 37
6ce212e4 38 Query OK, 0 rows affected
5e73b66f 39
2671e98d
AB
40If the InnoDB storage engine is available, it will be used for all database
41tables. InnoDB provides features over MyISAM such as transaction support,
42row-level locks, and consistent non-locking reads.