Recent Topics

MySQL error when isntalling

Started by on Sep 12, 2004 – Contents updated: Sep 12, 2004

Sep 12, 2004 16:02    


I get a MySQL error when installing, right after the first page or so:

MySQL error!

Error establishing a database connection!

1. Are you sure you have typed the correct user/password?
2. Are you sure that you have typed the correct hostname?
3. Are you sure that the database server is running?

The username and password I use are correct, as is the database name (I log in with these, using a MySQL client on my machine at home (the installation is on a remote server). The SQL host defaults to "localhost" but when I type in the server name instead, nothing changes and I still get the MySQL error.

Any ideas what the problem could be here?


Babak Fakhamzadeh

Sep 12, 2004 23:10

As logn as you get this message, you have a problem with setting up your php/database connection. We can't help you there. Your hosting provider can.

Sep 16, 2004 19:37

I know that you said you need to check with your hosting service. But eh.... What if that?s me? :(

I am having the exact same problem on a Windows box running apache 2. PHP seems to be setup correctly, as does mysql.

I judged that by the following:

C:\mysql\bin>mysql -h localhost -u root -p
Enter password: ********
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.20a-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

I tried to set it up to run via root (strike me dead later for it, but right now I want to keep this as simple as possible and remove as many variables as I can), but I am getting the same error that MastaBaba is. I cannot seem to get it to connect to the database. I have created the b2evolution table via myphpadmin with no problem.

If anyone could please give me a nudge in the right direction, I would really appreciate it.

note: One major difference on my system is that I am setting it up on port 812 (stupid isp blocking port 80).

Sep 22, 2004 04:04

Well, I found out the error by myself. I am posting the result so that no one else will have to dig like crazy to find the answer.

If you get the webpage listed above, make sure you edit the _config.php file and edit the database connections as listed here.

make sure your login matches the one provided to you/created by you in mysql.

hope it helps


Jul 05, 2005 00:47

I banged my head on this problem for a while before I remembered that there is an incompatiblity between some versions of PHP and MySQL. I'm using PHP 5.0.3 and MySQL 4.1.9.

Specifically, new versions of MySQL use a NEW password format. If you create a user in MySQL and try to use that login with any PHP script, it will fail. MySQL has a command to use the old password:

SET PASSWORD FOR "dbuser"@"dbhost" = OLD_PASSWORD( "yourpassword" )

This tells MySQL to use the old, compatible format of the password.

Form is loading...

Photo albums software – This forum is powered by b2evolution CMS, a complete engine for your website.