By OldSoak on
Hi,
After uploading Drupal, importing all the database.mysql items and editing settings.php, I get the following error in my browser (when i type in http://www.mysite.co.uk/drupal_install_directory/ )
Unknown MySQL Server Host 'username' (1)
My settings look like this:
$db_url = 'mysql://username:foobar@db138.myhost.co.uk/db75849';
$db_prefix = '';
Whats puzzling me is that it is complaining about the hostname, but throwing back the username at me, could anyone help?
I've checked MyPHPAdmin several times and i'm definitely putting in the right information, i've even phoned my web host and confirmed that the hostname is correct.
Comments
Parse errors?
Just a shot in the dark; do your pwd or username contain one of those characters?
'Forbidden' characters from settings.php
* Note that the $db_url variable gets parsed using PHP's built-in
* URL parser (i.e. using the "parse_url()" function) so make sure
* not to confuse the parser. If your username, password
* or database name contain characters used to delineate
* $db_url parts, you can escape them via URI hex encodings:
*
* : = %3a / = %2f @ = %40
* + = %2b ( = %28 ) = %29
* ? = %3f = = %3d & = %26
Thanks! I forgot that my
Thanks! I forgot that my password had a "/" character, thats all sorted now, though now I receive a different error message!:
Access denied for user: 'username@212.227.127.48' (Using password: YES)
No Idea where the "YES" came from, i certainly didnt type it!
Could you help?
Localhost?
I'm not sure if your webserver and dbase server are on the same computer. In that case it might be necessary to use localhost as the servername.
If they are not, check if the MySQL user you've created also has permission to access from the webserver.
MySQL Username and Password
Remember in Mysql there is two ways to grant access for a user.
If your MySQL server is on a different server than your site you have to grant access using the following command.
GRANT ALL PRIVILEGES ON databasename.* TO 'username'@'%'IDENTIFIED BY 'password';
To grant access for this user localy using localhost:
GRANT ALL PRIVILEGES ON databasename.* TO 'username'@'localhost'IDENTIFIED BY 'password';
Are Casilla
http://astartelecom.com - Independent VOIP Telecoms Broker. Consulting in Asterisk and Drupal
http://astbill.com - Billing, Routing and Management software for Asterisk and MySQL. Running on Drupal
AstBill DEMO: http://demo.astbill.com