Ajay Kulkarni
Ajay Kulkarni

Reputation: 3039

Installing a Drupal template

My client had a Drupal project. She wanted me to install it in my system and develop it further. I downloaded that template, copied it to var\www\html folder, gave suitable file permissions and opened it in browser. And I got this error:

Error
The website encountered an unexpected error. Please try again later.
Error message
PDOException: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) in lock_may_be_available() (line 167 of /var/www/html/csp-v1/includes/lock.inc).  

Where should I give my MySQL password?

Upvotes: 1

Views: 69

Answers (2)

pgdagenais
pgdagenais

Reputation: 106

In the settings.php file. You can configure your database information.

sites/default/settings.php

$databases = array (
  'default' =>
  array (
    'default' =>
    array (
      'database' => 'drupal',
      'username' => 'drupal',
      'password' => 'password',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),
  ),
);

Upvotes: 2

MilanG
MilanG

Reputation: 7114

First, are you talking about Drupal template (file) or about Drupal theme? Those are 2 different things. Theme defines how you Drupal site will look like and template is just a single file in a theme, one of many, defining just a part of some page or similar.

So, not even theme (not to mention single template file) is enough to have full Drupal site.

If you have whole site, change the database access info, as Tchevass explained, the login and go to Configuration -> Media -> File system and check are all paths writable, because Drupal needs them. Just click "Save configuration" and if some field get's red outline that means path is not writable...so you have to make it.

But if you have only a theme you have to download and install Drupal, then move your theme to /sites/all/themes/theme_name and go to Appearance and turn it on.

Upvotes: 0

Related Questions