Click to See Complete Forum and Search --> : Error on line....


p0ng0
07-30-2007, 05:41 AM
Hey,
i wondered if someone can shed some light on to a problem i've got with my mySQL.

I'm currently doing a project, small, that clients can log into our website and view their cases (solicitors firm) online.

I tried and tested the database and website at home, on my personal computer. Everything there worked. I put all the files onto my iPod so that i could do this at work and hopefully get it to work there.

I installed a web server called Abyss; which i find to be very useful and easy to use. I'm using phpMyAdmin to create the databases and for mySQL i'm using WinMySQLadmin 1.4.

If you're aware of WinMySQLadmin, you'll know that there are 3 lights, traffic-lights, red, amber and green. When the light is on green, everything is ok and running. At home, the lights are green.

At work, the lights are red.
When i go to localhost, the page should display a login screen, as it does at home, but instead i get the following error:


Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to MySQL server on 'localhost' (10061) in C:\Program Files\Abyss Web Server\htdocs\Connections\connectDB.php on line 9

Fatal error: Can't connect to MySQL server on 'localhost' (10061) in C:\Program Files\Abyss Web Server\htdocs\Connections\connectDB.php on line 9

Here is the coding for the actual page called "connectDB.php

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_connectDB = "localhost";
$database_connectDB = "users";
$username_connectDB = "root";
$password_connectDB = "*hidden*";
$connectDB = mysql_pconnect($hostname_connectDB, $username_connectDB, $password_connectDB) or trigger_error(mysql_error(),E_USER_ERROR);
?>

blulagoon
07-30-2007, 07:16 AM
The red traffic light in WinMySQLAdmin suggests that MySQL isn't running, so you aren't going to be able to connect. What happens when you try and start MySQL ?

I'll assume you are running on a Windows PC, in which case you'd either start it from within WinMySQLAdmin or from Control Panel/Services (don't know about Vista). Is there an error message explaining why MySQL won't start ?

Blu

n.b. If problems persist might be better asking this on the MySQL forum.

p0ng0
07-30-2007, 08:09 AM
The red traffic light in WinMySQLAdmin suggests that MySQL isn't running, so you aren't going to be able to connect. What happens when you try and start MySQL ?

I'll assume you are running on a Windows PC, in which case you'd either start it from within WinMySQLAdmin or from Control Panel/Services (don't know about Vista). Is there an error message explaining why MySQL won't start ?

Blu

n.b. If problems persist might be better asking this on the MySQL forum.


Hi blu, thanks for the reply.
Yeah im running Windows XP Pro.
There is no error on MySQL, although on the main part of the program; under Environment, there is no details filling server info, host info, client info, etc.

On the tab: Start Check; it says there is a my.ini file : YES
verifying the mysql.ini keys : OK
mysql server path keys.
datadir : OK
basedir : OK

and here is the content of my.ini

#This File was made using the WinMySQLAdmin 1.4 Tool
#24/07/2007 11:13:55

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
basedir=C:/Program Files/mysql
#bind-address=10.0.0.72
datadir=C:/Program Files/mysql/data
#language=C:/Program Files/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/Program Files/mysql/bin/mysqld-nt.exe
user=admin
password=*password*

ERR FILE is blank.

Variables, Processes, Databases & Reports are all blank.


I hope this can explain further to the problem.

I did enter this also in the SQL forum, but a member advised me that i should ask a moderate to add this to PHP, although i don't know how to, so i went ahead and stuck it here also.