Create Drupal database using Plesk

Last modified: March 24, 2007 - 23:07

Create the database
Login and select Services » Databases

This loads a page with an overview of databases. Depending on your host a database may already have been created. This is often the case with low-budget hosts, where you are limited to one database. In that case, use table prefixing. If no limits exists it is best to create a new database for Drupal via: Add New Database.

Click on the name of the database you wish to use. In the overview page you'll see all users for this database. Again, depending on your host, you need to create a new user via: Add New Database User.

If you do not have the option to create new database users, use a pre-existing one.

Load the Drupal database scheme
From the database users overview page click DB WebAdmin

The icon is a blue stack with a monkey wrench. Note that this opens phpmyadmin in a pop-up that may be blocked by your browser.

First make sure the relevant database is selected. If necessary, click Databases in the phpmyadmin start screen and then the database name.

Go to the SQL screen via a small button labelled SQL in the left pane of the phpmyadmin screen.

If you've created a new user for the Drupal database, you need to grant priviliges to the user: execute the SQL query:

GRANT ALL PRIVILEGES ON databasename.* TO username@localhost IDENTIFIED BY 'password';

where

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

This may not complete successfully; in that case you'll have to assume / hope the user was created with the necessary privileges.

To create the database layout, select the tab import files. Upload the file database/database.mysql with the database scheme.

Plesk grants privs for you?

tobyspark - March 21, 2006 - 13:08

Having had the virtual server I use upgraded to Plesk 7.5.4, I attempted to install drupal. I am having no joy, which is a pretty big disclaimer to my comment here - see http://drupal.org/node/20397 - but I think it is unrelated to this.

I can't grant all privs to the mysql user as per this page. I think this article is out of date as a) the db user plesk creates doesn't have the grant privs so there's a difference in Plesk versions going on here and b) there is no way for the end-user to set this so it follows that Plesk does this for you, which ties up with the fact I can upload the schema and the users are being added.

I checked the mysql documentation and couldn't find a command to report the priviledges a user has, so I couldn't verify this directly.

Toby

 
 

Drupal is a registered trademark of Dries Buytaert.