PDA

View Full Version : "Error establishing mySQL database connection." i'm STUCK ON 'Step 2/4'



justmailnaveen
07-05-2010, 04:41 AM
I'm trying to install hotaru on hostgator .:)

BUt ,I'm getting this long list of errors :confused: which basically looks like this.

NOTE:- the actual list of errors is very long but they all are repeating the same message.


Warning: Error establishing mySQL database connection. Correct user/password? Correct hostname? Database server running? in /home/xxxxx/public_html/mysite.com/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 93

Warning: mySQL database connection is not active in /home/xxxxx/public_html/mysite.com/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 125


I don't know where i went wrong:confused:

i checked the permissions,database details every thing is correct.

I've installed hotaru on localhost yesterday and it worked w/ some minor glitches.

Any help PLZ.:D

Thanks in Advance.:)

Nick
07-05-2010, 04:55 AM
i checked the permissions,database details every thing is correct.

Sure? Maybe you're missing the database prefix before the name or user?


// Database details
define("DB_USER", 'blah_username');
define("DB_PASSWORD", 'mypassword');
define("DB_NAME", 'blah_dbname');
define("DB_HOST", 'localhost');Or maybe your web host uses something different than "localhost"?

nothingman
07-05-2010, 07:17 AM
Or maybe your web host uses something different than "localhost"?

Can't say about other web hosting companies, but if you're on godaddy, you will need to change localhost to something else.

For godaddy:-

Go to my products >Hosting > Launch > Databases > MySql Icon > Select your database > Setup icon and use the following value marked in red.

http://i.imgur.com/HgITt.jpg

justmailnaveen
07-10-2010, 01:22 PM
// Database details
define("DB_USER", 'blah_username');
define("DB_PASSWORD", 'mypassword');
define("DB_NAME", 'blah_dbname');
define("DB_HOST", 'localhost');

well i checked those and they are CORRECT,
my host DOES use 'localhsot'

the problem still exist,what else should i check?

Nick
07-10-2010, 01:48 PM
Open /libs/extensions/ezSQL/mysql/ez_sql_mysql.php.

On line 82 (after the "global" line), add this:


echo "dbhost: " . $dbhost . " dbuser: " . $dbuser . " dbpassword: " . $dbpassword; exit;That will show your settings (and exit) immediately before the connection attempt happens on line 90.

If your settings look correct and mysql_connect on line 90 still fails, then the problem lies either with your server or your settings.

justmailnaveen
07-10-2010, 02:52 PM
is this line 82 ?

http://imgur.com/CNggD.png (http://imgur.com/CNggD.png)

Nick
07-10-2010, 03:06 PM
Yep, that is indeed line 82. :)

anika039
07-19-2010, 03:28 PM
I read all of this and did all the things. But I cant do it. Please tell me something to do.
I tried to show screen shot but I could not do it. after adding

echo "dbhost: " . $dbhost . " dbuser: " . $dbuser . " dbpassword: " . $dbpassword; exit; It showed my db user name and password only. what to do?

anika039
07-19-2010, 06:52 PM
Hi, I did all of this and after adding this in line 82 my browser shows only the database name and my password. Now what to do? why this installing is so difficult and boring?

Nick
07-20-2010, 12:10 AM
why this installing is so difficult and boring?

It's not. For people our age, it's an exciting puzzle.

Who's your web host? What's your url? Show us your settings file (with a fake username and password).

Give us something to work with and maybe we can help.

shibuya246
07-20-2010, 03:00 AM
Hi, I did all of this and after adding this in line 82 my browser shows only the database name and my password. Now what to do? why this installing is so difficult and boring?

The problem looks like it is with your SQL setup. We cant guess what the settings are, so can you please help by telling us some info? What is your url for the site and i can take a look at the errors directly

anika039
07-20-2010, 10:00 AM
http://www1.picturepush.com/photo/a/3835219/640/3835219.jpg
http://www2.picturepush.com/photo/a/3835230/640/3835230.jpg
http://www1.picturepush.com/photo/a/3835254/640/3835254.jpg

I want to delete all data and want to do all things again from beginning. Pls give me some advice.

nothingman
07-20-2010, 10:20 AM
I want to delete all data and want to do all things again from beginning. Pls give me some advice.

To delete all data, you would need to open you database in PHPMyAdmin and use the DROP TABLE statement. From what I gather, you don't have any data in your database tables, so the drop table statement would do. Else, use the truncate table table_name statement.

Example to drop and truncate the comments table (assuming you have prefixed your tables with hotaru_ during set up):

Drop table statement: Drop table hotaru_comments;

Truncate table statement: TRUNCATE TABLE hotaru_comments;

Nick
07-20-2010, 10:21 AM
Anika, did you check with your web host to see id "localhost" is the correct value for DB_HOST?

I looked up the name of your webhost and it's starhostbd.com, right? I can't find any support forums or detailed information about your server setup, so you will need to check with them. The problem is not with Hotaru, but with your database details or server requirements.

Nick
07-20-2010, 10:25 AM
From what I gather, you don't have any data in your database tables

Actually, Anika won't even have any database tables yet, so there really is nothing to delete. Thanks for trying to help, though. :)

anika039
07-20-2010, 06:14 PM
hi, thanks, yes, I took hosting from starhostbd.com . but in my phpmyadmin I saw my host name is localhost. what types of information do I need more. can you pls tell me.

Nick
07-20-2010, 11:39 PM
Well, one thing you could do is test your database connection without using Hotaru...

Open a new text file and paste this into it with your database details:


<?php

$dbhost = 'localhost';
$dbuser = 'username';
$dbpass = 'password';
$dbname = 'databasename';

echo "Connecting to MySQL...<br />";

$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql');

echo "Selecting the database...<br />";

mysql_select_db($dbname);

echo "Closing the connection...<br />";

mysql_close($conn);

echo "Finished.";

?>

Save it as database_test.php and upload it to your root directory.

In your browser, open example.com/database_test.php and see if you get any errors.

anika039
07-21-2010, 10:25 PM
I did nothing but setup it in my another site www.sporticka.com and it worked. Then I delete my setup and did it from the beginning. After setting up, it shows me the message when i create category.
http://www1.picturepush.com/photo/a/3843794/800/Anonymous/kkkk2.jpg

Then I did the whole thing again. I also checked the mentioned file in both of my site but it did not worked. What to do please.

Nick
07-22-2010, 12:13 AM
You need the mbstring PHP extension enabled on your server.

http://www.php.net/manual/en/book.mbstring.php

anika039
07-22-2010, 10:15 AM
You need the mbstring PHP extension enabled on your server.

http://www.php.net/manual/en/book.mbstring.php

where to setup? do i need to contact with my hosting company or i have to do this in my cpanel. i dont know. please help.

Nick
07-22-2010, 11:57 AM
If you are on a shared server, you will need to ask your web host.

loganimal
09-19-2010, 03:58 PM
Hi,

I'm having the same connection problems as Anika. I'm set up on Dreamhost. I used the database_test.php file Nick created and it didn't show any errors but I'm still stuck on step 1 of Hotaru installation. I have to use a different database name (hotaru is taken apparently), and I have used the appropriate hostname - but after a million tries I still get "The database does not exist or the connection settings are incorrect."

Any help would be much appreciated.

loganimal
09-20-2010, 02:33 AM
It works now. I

a) let it soak overnight
b) pretended to update the site (with the manually updated settings.php)
c) went back after step 2/3
d) chose to install again - and this time the database connected and it worked!

Casif
11-30-2010, 05:38 PM
Hi

Iīm having the same problem, the step one keeps showing

The 'hotaru_settings' file was created.
The database does not exist or the connection settings are incorrect.

And all the details are correct, and of course the database exists, I donīt have mucho of a technical background, please I switch from pligg because I thought that this was easier to work with (still believe it is)

Any help is more than appreciated

Thanks!!

Nick
12-01-2010, 12:03 AM
On step 1 of installation click this:

"If you prefer to edit the settings file manually click here"

Casif
12-01-2010, 07:55 PM
Hi Nick, thanks for the quick answer

Well thatīs what I did, and this is what I get, I have replaced the name of the database with (*) but I get tons more of similar errors, Iīm using 1&1 hosting. Any guess?

Many thanks

Warning: Error establishing mySQL database connection. Correct user/password? Correct hostname? Database server running? in /homepages/19/*******/htdocs/hotaru/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 93

Warning: mySQL database connection is not active in /homepages/19/******/htdocs/hotaru/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 125
Hotaru CMS Setup v.1.4.2
Step 2/4: Create Database Tables

Warning: Error establishing mySQL database connection. Correct user/password? Correct hostname? Database server running? in /homepages/19/*******/htdocs/hotaru/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 93

Warning: mySQL database connection is not active in /homepages/19/********/htdocs/hotaru/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 125

Warning: mySQL database connection is not active in /homepages/19/********/htdocs/hotaru/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 125

Warning: Error establishing mySQL database connection. Correct user/password? Correct hostname? Database server running? in /homepages/19/*******/htdocs/hotaru/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 93

Warning: mySQL database connection is not active in /homepages/19/********/htdocs/hotaru/libs/extensions/ezSQL/mysql/ez_sql_mysql.php on line 125
No existing tables were found in the database

Casif
12-01-2010, 08:01 PM
Hey to anyone that has similar problems, with 1&1 hosting, they need to manually remove local host on the settings.php file, and copy paste de 1&1 host name, where it says to do so on the file!!! Finally!!!!

Thanks again Nick

batuhanu
11-03-2011, 11:05 AM
never mind.. solved..