Topic: Error: Unable to connect to MySQL server.

Hi anyone could help me in this area. I have recently change the server to
host the forum. After changing the server i have this error msg:

Error: Unable to connect to MySQL server.
MySQL reported: Access denied for user
'lintec_jeremy'@'localhost' (using password: YES).


Can anyone here advise on how to rectify this problem.

Thank you

2

Re: Error: Unable to connect to MySQL server.

In config.php :

$db_host = 'localhost';
$db_name = 'blabla';
$db_username = 'blabla';
$db_password = 'blabla';

replace everything that has changed, like $db_host for example.

Re: Error: Unable to connect to MySQL server.

How to go to the config?
What are to be changed?
localhost ? whats the localhost? where can it be found ?
Userid and password? Is it the same userid & password which i created using htaccess login to the forum?

Please advise me
thank you very much

4

Re: Error: Unable to connect to MySQL server.

config.php is a file inside your forum root folder, you have to edit everything that has changed (since you moved to a new server).
So you'll need :

- your new mysql server url (for $db_host value) the old one was set to 'localhost' the new one may be different.
- your new database name (for $db_name value)
- your new database username (for $db_username value) old one was 'lintec_jeremy'
- your new database password (for $db_password value)

your host probably gave you all those informations by e-mail along with your ftp info.

If you didn't already do it, you'll also have to make a backup of your old database and import it into the new one by using phpmyadmin for example.
Have fun. tongue

Re: Error: Unable to connect to MySQL server.

Hi thanks, i manage to change the informations.
But now i receive another error msg:

Error: Unable to connect to MySQL server. MySQL reported:
Client does not support authentication protocol requested
by server; consider upgrading MySQL client.

Please advise
Thanks

6 (edited by Yus 2005-10-17 06:22)

Re: Error: Unable to connect to MySQL server.

Hmm check the punbb config.php file for

$db_type = 'mysql';

and change mysql to mysql4 or vice versa.

Re: Error: Unable to connect to MySQL server.

Yus: That's not right tongue
It simply means he needs to
A. try mysqli
B. If that doesn't work, talk to his host about using OLD_PASSWORD for his MySQL user's password

Re: Error: Unable to connect to MySQL server.

Hi,

I tried but both mysql4 & mysqli does not work.
Currently i change to mysqli and it gives me this err msg:

This PHP environment doesn't have Improved MySQL (mysqli) support built in.
Improved MySQL support is required if you want to use a MySQL 4.1 (or later)
database to run this forum. Consult the PHP documentation for further assistance.


pls advise

Re: Error: Unable to connect to MySQL server.

You have to do what I said for B: talk to your host about setting up your MySQL user's password to use OLD_PASSWORD (or, alternately, getting them to use PHP5 and install the MySQLi extension)

Re: Error: Unable to connect to MySQL server.

hi thank you for your reply. I am hosting this server on my own.
Its a dedicated server too costly to get a managed one. If i were to do
on my own, where and how to install php5 & mysqli.

Please do guide me through

Thank you

11

Re: Error: Unable to connect to MySQL server.

Ok so if you're on your own for the server maintenance, you should be able to do this :
http://dev.mysql.com/doc/refman/5.0/en/old-client.html

Re: Error: Unable to connect to MySQL server.

hi i am unable to do that, i am not sure on to do after reading the documentation.