2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
CREATE THE MySQL DATABASE
|
|
|
|
--------------------------
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2011-02-04 21:26:25 +00:00
|
|
|
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.
|
2005-11-25 10:11:59 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
First, you must create a new database for your Drupal site (here, 'databasename'
|
|
|
|
is the name of the new database):
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
mysqladmin -u username -p create databasename
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
MySQL will prompt for the 'username' database password and then create the
|
2010-01-11 16:25:16 +00:00
|
|
|
initial database files. Next you must log in and set the access database rights:
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
mysql -u username -p
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
Again, you will be asked for the 'username' database password. At the MySQL
|
2012-01-13 13:30:19 +00:00
|
|
|
prompt, enter the following command:
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2007-11-19 19:53:51 +00:00
|
|
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER
|
2006-09-08 16:29:35 +00:00
|
|
|
ON databasename.*
|
|
|
|
TO 'username'@'localhost' IDENTIFIED BY 'password';
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
where
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
'databasename' is the name of your database
|
|
|
|
'username@localhost' is the username of your MySQL account
|
|
|
|
'password' is the password required for that username
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
Note: Unless your database user has all of the privileges listed above, you will
|
|
|
|
not be able to run Drupal.
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
If successful, MySQL will reply with:
|
2005-11-25 10:07:49 +00:00
|
|
|
|
2006-09-08 16:29:35 +00:00
|
|
|
Query OK, 0 rows affected
|
2007-08-26 07:46:11 +00:00
|
|
|
|
2009-04-25 16:57:19 +00:00
|
|
|
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.
|