Hi

Am new to using Drupal and having an issue getting the correct php string in the settings.php where it says to put in your username:password@localhost etc.

It gives you an example:

* Database URL format:
* $db_url = 'mysql://username:password@localhost/databasename';
* $db_url = 'mysqli://username:password@localhost/databasename';
* $db_url = 'pgsql://username:password@localhost/databasename';
*/
$db_url = 'mysql://username:password@localhost(is this the ftp client password or the database password please? When I put in the database password and have tried various ways it does not recognise it, on the database user and db name/databasename';
$db_prefix = '';

when I try the usual way it comes up with a parse error during installation saying it recognises the database user and passwrd but not the database name, even though these have been set up properly with permissions.

it says during installation:

Warning: parse_url(mysql://username:password@localhost/databasename): Unable to parse url in /home/mydragon/mydragonateamazingnoodles.com/html/Paranormal/includes/database.mysql.inc on line 33

am confused as I know the database, username and password for the username is correct and also the user is linked to the database with all permissions set correctly.

I am new to this way of writing the database connection command as I am used to doing it "localhost" "dbname" "password" "username" "prefixs".

could I have an example of what to put in there please as its confusing me.

thanks Dragonies

Comments

my settings.php

my settings.php

$db_url = 'mysql://usernamefor database:user password@localhost/database name';
$db_prefix = '';

$base_url = 'http://www.yoursitename.com';

ini_set('arg_separator.output', '&');
ini_set('magic_quotes_runtime', 0);
ini_set('magic_quotes_sybase', 0);
ini_set('session.cache_expire', 200000);
ini_set('session.cache_limiter', 'none');
ini_set('session.cookie_lifetime', 0);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.save_handler', 'user');
ini_set('session.use_only_cookies', 1);
ini_set('session.use_trans_sid', 0);
ini_set('url_rewriter.tags', '');

note that in my case ini_set('session.cookie_lifetime', 0); is set to zero. this supplies when the user closes the browser window, it automatically logs out. if you see it is usefull you can do the same.

since i did not need any other rows etc. i just deleted them

Drupal to rule them all :) www.universideliyiz.biz

Drupal to rule them all :) ideviate

Example

Your MYSQL username is jamesbond
Your MYSQL password is goldengun007
Your database is named goldeneye
Your database is located on the localhost.

$db_url = 'mysql://jamesbond:goldengun007@localhost/goldeneye';

On many rented hosts, you are allocated one database only, and that database may be named the same as your user account name.

It is sound practice to create a MySQL user that is specific to your Drupal installation, but you may not be able to do that on a rented host.

On a rented host, your FTP user name, MySQL account name, and MySQL database name may all be the same.

database connection issue

Thanks Yelvington, that helped alot. I have now got connected. :)

many thanks
Dragonies

nobody click here