Having problems installing Drupal? See the Installation Guide for more information.

Error connecting to database

I am trying to install a new Drupal-4.6.3 site on a Redhat server with PHP 5 and MySQL 3.23.58.

When I had the $base_url incorrectly set to the root directory instead of the sub-directory where I have placed the Drupal files, I was able to connect to the "Welcome to your new Drupal-powered website" page, but clicking on "Create the first user account" produced a "index.php not found" error.

When I corrected the $base_url value, Iinstead of the 'Welcome" page I now get the following error

Warning: mysql_connect(): Access denied for user: 'myname@myhost.com' (Using password: YES) in /home/mysite/drupal-4.6.3/includes/database.mysql.inc on line 31
Access denied for user: 'myname@myhost.com' (Using password: YES)

line 31 being

$connection = mysql_connect($url['host'], $url['user'], $url['pass'], TRUE) or die(mysql_error());
mysql_select_db(substr($url['path'], 1)) or die('unable to select database');

return $connection;

I have loaded the Drupal tables to a previously existing database. The username, password and database name I have set in $db_url are those which give me access to the database in the account Administration page.

Some background -
I had earlier problems between setting up "settings.php" and connecting via browser because my host had chosen that exact moment to change my account password, informing me by emailing to my default email address (which uses the same password, and which obviously I could not read!!!)

Unsupported database type

After installing I get this when I point my browser to index.php:

Unsupported database type

The database on my server is MySQL 4.1.13

I know others have posted about this same problem, but I don't see any usefull solutions.

Where is my Drupal site? What should I point my browser to?

I uploaded the Drupal files to folder called 'drpl' on the server.

I inserted the tables in the database.

I inserted the database access details in the 'settings.php' file. It looks something like this:

 * Database URL format:
 * $db_url = 'mysql://mydatabase:mypassword@localhost/mydatabase';
 
/**
 * Base URL:
 *
 * The URL of your website's main page. It is not allowed to have
 * a trailing slash; Drupal will add it for you.
 */
$base_url = 'http://www.mywebsite.com/drpl';

Now what?

"Unable to Select Database" error

I have searched and RTFineM.
If I change anything in the name of the database to make it wrong in settings.php on the

$db_url = 'mysql://me:337nA@mysite.com/dru1';

line I still get the "Unable to Select Database" error.
If I make anything in either user or password wrong I get a

Warning: mysql_connect(): Access denied for user:

error.
If I make anything in the Localhost name wrong I get

Warning: mysql_connect(): Unknown MySQL Server Host.

Drupal 4.6.3 on FreeBSD5.3/Apache2.0.54/Php5.0.5 Install Mostly worked

I get messages like this one from .../drupal/?q=admin/themes/settings/bluemarine or trying to configure any of the other themes.

Fatal error: Only variables can be passed by reference in /usr/local/services/www/wikarekare/drupal/modules/system.module on line 649

I also got similar ones from modules I have added
e.g. drupal/?q=admin/theme_editor

Fatal error: Only variables can be passed by reference in /usr/local/services/www/wikarekare/drupal/modules/theme_editor.module on line

Access Denied in query: Lock Tables

I just made a new install of Drupal 4.6.3 and started getting the following error right away:

Access denied for user: 'kohala@localhost' to database 'kohalaaction_org' query: LOCK TABLES sequences WRITE in /home2/kohala/kohalaaction-www/communityvoices/includes/database.mysql.inc on line 66.

I toggled the show error on page/log so at least it no longer crashes the page, but I am worried that it will cause some long term problem.

Everything else seems to work just fine. Should I just ignore this or try to track down the cause.

Pages

Subscribe with RSS Subscribe to RSS - Installing Drupal