I've recently set up Ubuntu w/ Apache, PHP & MySQL. I was trying to install the Drupal CMS on it. I came to step 4 on http://drupal.org/node/43807, where I have to define the db_url and base_url in the settings.php file:
<i>Open the configuration file and edit the
$db_url line to match the database defined in the previous steps:
$db_url = "mysql://username:password@localhost/drupal";
Set $base_url to match the address to your web site:
$base_url = "http://www.example.com";</i>
(This file is located on /var/www/drupal-4.6.5/sites/default/settings.php) I made a copy by doing cp ./settings.php ./settings.php.backup, made the changes, saved it. Didn't work. At first the link goes to my /var/www folder, I then change the base_url to "http://[localhostname]/drupal-4.6.5", and it threw me this error:
<i>Warning: mysql_connect() [function.mysql-connect]: Host 'localhost.localdomain' is not allowed to connect to this MySQL server in
/var/www/drupal-4.6.5/includes/database.mysql.inc on line 31 Host 'localhost.localdomain' is not allowed to connect to this MySQL server</i>
The next day, I looked into the database.mysql.inc file, line 31... obviously the db_url variable in settings.php isn't being passed correctly as it still has "localhost.localdomain" instead of my [localhostname]. I went back to setting.php. Tried to make changes to it... but somehow, it threw me a warning saying I'm "making changes to a read-only file system". I thought it was only a user permission thing. I exited vi, changed to root user, same thing! I then tried to remove the file and start over... same thing: