Click to See Complete Forum and Search --> : my_sql connection problem


asa_carter
10-12-2003, 05:23 PM
Hi,

I've had mysql running fine on localhost but now it wont connect and I cant figure out why.

all i get is this error:

ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

and..

MYSQLADMIN: connect to server at 'localhost' failed
error: 'Can't connect to MySQL server on 'localhost' (10061)'
Check that mysqld is running on localhost and that the port is 3306.
You can check this by doing 'telnet localhost 3306'

and..

C:\MYSQL\BIN>telnet localhost 3306
Connecting To localhost...Could not open connection to the host, on port 3306.
No connection could be made because the target machine actively refused it.


Any idea's? I'm really stuck!

Thanks,

LordShryku
10-12-2003, 05:26 PM
Yeah, check that it's running....

asa_carter
10-12-2003, 05:30 PM
i just get that error

LordShryku
10-12-2003, 05:32 PM
You're on Windows. Look in the Task Manager for mysqld. If it's there, it's running. Otherwise, you need to to do a NET START mysqld

asa_carter
10-12-2003, 05:34 PM
Its not running.

how do i do a net start mysqld?

C:\MYSQL\BIN>NET START mysqld
The service name is invalid.

LordShryku
10-12-2003, 05:40 PM
Maybe it's NET START mysql, been a while....

asa_carter
10-12-2003, 05:44 PM
C:\MYSQL\BIN>net start mysql
The MySql service is starting.
The MySql service was started successfully.


C:\MYSQL\BIN>mysqlshow
MYSQLSHOW: Can't connect to MySQL server on 'localhost' (10061)

C:\MYSQL\BIN>

LordShryku
10-12-2003, 05:46 PM
Is it in task manager now? I'm thinking you may have some problems with the install, so it's stopping as it starts...

asa_carter
10-12-2003, 05:46 PM
Before it stopped working, I deleted a couple of databases in phpmyadmin.

I think that may have something to do with it. I'm not very clued up with mysql admin.

I have not edited any of the config recently though.

LordShryku
10-12-2003, 05:47 PM
Ahhhhhhhhh....did you delete the "mysql" database? If so, re-install. That database is vital to mysql running.

asa_carter
10-12-2003, 05:48 PM
If i re-instsall it, will i lose my other databases and the data in it?

LordShryku
10-12-2003, 05:51 PM
make a copy of C:\mysql\data. That folder contains all of the databases you have. One the new install is done, you can paste the contents of the backup into the new data folder(don't actually over-ride anything), and mysql will rebuild the indexes and data for your old databases.

asa_carter
10-12-2003, 06:00 PM
Thanks. Thats solved it now.