Newer
Older
Dries Buytaert
committed
Dries Buytaert
committed
CREATE THE MySQL DATABASE
--------------------------
Dries Buytaert
committed
Dries Buytaert
committed
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.
Dries Buytaert
committed
Dries Buytaert
committed
First, you must create a new database for your Drupal site (here, 'databasename'
is the name of the new database):
Dries Buytaert
committed
Dries Buytaert
committed
mysqladmin -u username -p create databasename
Dries Buytaert
committed
Dries Buytaert
committed
MySQL will prompt for the 'username' database password and then create the
Angie Byron
committed
initial database files. Next you must log in and set the access database rights:
Dries Buytaert
committed
Dries Buytaert
committed
mysql -u username -p
Dries Buytaert
committed
Dries Buytaert
committed
Again, you will be asked for the 'username' database password. At the MySQL
prompt, enter the following command:
Dries Buytaert
committed
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER,
CREATE TEMPORARY TABLES ON databasename.*
Dries Buytaert
committed
TO 'username'@'localhost' IDENTIFIED BY 'password';
Dries Buytaert
committed
where:
Dries Buytaert
committed
Dries Buytaert
committed
'databasename' is the name of your database
'username' is the username of your MySQL account
'localhost' is the web server host where Drupal is installed
Dries Buytaert
committed
'password' is the password required for that username
Dries Buytaert
committed
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.
Dries Buytaert
committed
Dries Buytaert
committed
If successful, MySQL will reply with:
Dries Buytaert
committed
Dries Buytaert
committed
Query OK, 0 rows affected
Angie Byron
committed
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.