Friday, June 29, 2007

Drupal mysql database creation and assigning priviledges

Archived herein so that I can refer to this, whicle createg databases and assigning privileges.

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

mysqladmin -u username -p create databasename

MySQL will prompt for the 'username' database password and then create the initial database files. Next you must login and set the access database rights:

mysql -u username -p

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

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

where

'databasename' is the name of your database 'username' is the username of your MySQL account 'password' is the password required for that username

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

If successful, MySQL will reply with:

Query OK, 0 rows affected

To activate the new permissions, enter the following command:

FLUSH PRIVILEGES;

No comments:

VIM issues with powerline

What to do if you get this annoying issue - vi requirements.txt ...