MySQL error message, please.. anybody can help?

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
BOBenjaminZ
-


Joined: 23 Mar 2011
Posts: 1

PostPosted: Wed Mar 23, 2011 4:24 pm    Post subject: MySQL error message, please.. anybody can help? Reply with quote

First, sorry for my bad english.

I installed Abyss Webi Server X1 (latest version) and the installiatation did go just fine, and in the end, after installing it I was about trying to access a php-page (my own; index.php) and this is the message i get;

Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'Localhost' (10061) in C:\Abyss Web Server\htdocs\includes\functions\database.php on line 19
Unable to connect to database server!


And this is how it looks like in "database.php":

function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
global $$link;

if (USE_PCONNECT == 'true') {
$$link = mysql_pconnect($server, $username, $password);
} else {
$$link = mysql_connect($server, $username, $password);
}

if ($$link) mysql_select_db($database);

return $$link;
}



Is the anybody that maybe can help me out with this?

Thank you!
Back to top View user's profile Send private message
Toasty
-


Joined: 21 Feb 2008
Posts: 295
Location: Chicago, IL

PostPosted: Sat Apr 02, 2011 7:19 pm    Post subject: Reply with quote

That function is a bit excessive for a database connection. It's a wrapper function that doesn't do anything extra...


Beyond that, why not simply try this:

mysql_connect("localhost","root","rootpassword") or die(mysql_error());

The above code assumes that you're connecting over localhost (which your error shows), and it also assumes that you can connect as root (why can't you over localhost?), and you'll need to change "rootpassword" to whatever your password is.

From the error message, it looks like you have the mysql extension enabled fine (don't use pconnect unless you really know what you're doing)... I doubt there's any firewall issues on the system...

Was MySQL set to run on the default port 3306?

Does your PHP.INI have the default port set as 3306?

If both of those are true, look in your process list (Linux), or Component Services (Windows) and verify the presence of MYSQLD or MYSQL ?? and see that it is running.

Let me know of your findings.
_________________
Portfolio: Robert Lerner
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group