WordPress Installation : Error establishing a database connection

I run Wordpress with a Privacy Policy Plug-in. When I enable it, it crashes my site with “Error establishing a database connection”. When I disable it, all is fine.

I have 2 Wordpress sites running, the other one without a privacy policy has never given me any problems, it’s just the one with the interactive Privacy Policy that causes this?

Anyone else had this problem?

OK, so it happened again even after I disabled the Privacy Policy, so that is not the problem. Why is this happening? I have run a database repair from the wp-admin panel, then it works fine for a while, then bombs out again?

I’m using WordPress version 2.6.2, should I upgrade? My other Wordpress site is running fine on 2.6.2, never had a problem?

My UserName for MySql has been created correctly and configured in wp-config.php?
[U]
PHP Admin :[/U]

a9778201_****** a9778201_*** Enter phpMyAdmin
**[U]

wp-config.php :[/U]**

// ** MySQL settings ** //
define(‘DB_NAME’, ‘a9778201_***’); // The name of the database
define(‘DB_USER’, ‘a9778201_***’); // Your MySQL username
define(‘DB_PASSWORD’, ‘***’); // …and password
define(‘DB_HOST’, ‘mysql2.000webhost.com’); // 99% chance you won’t need to change this value
define(‘DB_CHARSET’, ‘utf8’);
define(‘DB_COLLATE’, ‘’);

It can’t be a config problem, the one minute it runs, shortly after it crashes then recovers and runs for a while again and continues in this pattern. Could it be SQL server issues on mysql2.000webhost.com, my other wordpress site runs on mysql4.000webhost.com

I’ve install wordpress manualy but itsn’t run to my domain / url like this picture please help me !!:confused:

that is because you uploaded it into a subdirectory. Just move the files to the public_html directory

I’m use Wordpress.But when updated from 2.6 to 2.7 .I can’t use Windows Live Writer to publish my posts.

Open ticket and ask support to recompile php with XLMRPC libraries…

i also have same problem
when i open index.php it tells error estab…connection
and when i open public_html/word press/wp-admin/admin.php then error…and tells to check username and pass or hostname

here is my sql setting

// ** MySQL settings ** //

** The name of the database for WordPress */
define(‘DB_NAME’, ‘a8287730_wpress’);

/** MySQL database username */
define(‘DB_USER’, ‘a8287730_wpress’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘**************’);

/** MySQL hostname */
define(‘DB_HOST’, ‘mysql11.000webhost.com’);

/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8’);

/** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ‘’);

Thanks For Help

What’s the URL of your WordPress site?

it is http://a5gamesandsoftwares.cf/Word%20Press/index.php

and for wp-admin , admin.php it is
http://a5gamesandsoftwares.cf/Word%20Press/wp-admin/admin.php

It can’t establish a database connection because your MySQL details in wp-config are wrong. There is no database with the name wpress in your account

Here www.a5gamesandsoftwares.cf/Word Press/index.php

And For Admin.php

a5gamesandsoftwares.cf/Word Press/wp-admin/admin.php

here
http://a5gamesandsoftwares.cf/Word%20Press/index.php

and For admin.php
http://a5gamesandsoftwares.cf/Word%20Press/wp-admin/admin.php

[25 minutes later]

yes actually we can create only 2 mysql database so i have taken from one of my friend

should i use my existing mysql database

If any of the two databases you have in your account is for WordPress then you need to put its name into your wp-config.php file

Yes i Know That But One Is For My Website’s Forum And One For Search Box
And So I Have Taken New Mysql From My Friend

That does not work. You can only use database from your account.

Ok thank you very much let me add details in wp-config

And Then i will tell u the results

Check Out The New problem. I Updated mysql database in wp-config.php now when i index.php firefox gives me this

"The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

This problem can sometimes be caused by disabling or refusing to accept cookies."

and in google chorme it tells that this redirection has many loops

Remove any .htaccess file in your public_html directory and/or WordPress directory.

i deleted .htaccess but didnt worked
still same
now moving files from word press to public_html

[17 minutes later]

now after deleting htaccess and wordpress directory
gives me this error

[30 minutes later]

hey i just removed all wordpress installation files and put new one and then worked
Actually it was again gave me same error redirecting one and then i opened wp-login.php and worked
Thanks For Helping Me :slight_smile: :smiley: