View previous topic :: View next topic |
Author |
Message |
BOBenjaminZ -
Joined: 23 Mar 2011 Posts: 1
|
Posted: Wed Mar 23, 2011 4:24 pm Post subject: MySQL error message, please.. anybody can help? |
|
|
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 |
|
|
Toasty -
Joined: 21 Feb 2008 Posts: 298 Location: Chicago, IL
|
Posted: Sat Apr 02, 2011 7:19 pm Post subject: |
|
|
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. _________________ Audit the secure configuration of your server headers! |
|
Back to top |
|
|
|
|
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
|
|