Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New MySQL install and Win XP = Kaput... 1

Status
Not open for further replies.

MartinCouture

Technical User
Feb 16, 2002
57
CA
I had Apache running with MySQL and php perfectly on Windows 2000 and then did the upgrade to Windows XP. So I tried Apache 2 with MySQL (mysql-4.0.12-win) and PHP 4.3.1 Everything was running fine untill I played around with Gallery (gallery.sourceforge.net) because it stoped working.

I decided to uninstall and reinstall mysql. Well after doing :
- Doing new my.ini in windows directory
- Starting mysqld-nt.exe as a service (C:\> C:\mysql\bin\mysqld-max-nt --install)
- Checking in services to make sure it was running, I get:
C:\mysql\bin>mysql
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

I checked with winmysqladmin.exe and it confirmed that 'The Server must be connected'.

even tried:
C:\mysql\bin\mysqld-max-nt --enable-named-pipe

I'm logged in as admin, I have done many uninstall/reinstall with reboots. Turned off the firewall (The win XP one)

Anything I missed or could try ???

Thanks -----------------
[flush]
 
I know I must say this too much but, have you tried loading mysql-cc and 'visually' looking at the DB and tables?

I'm just thinking if winmysqladmin is working ok then maybe if you could see it, you could fix it.

tgus

____________________________
Families can be together forever...
 
MySQLcc (control center) cannot connect to the server, same error : ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

winmysqladmin is running but cannot connect to the database : Red light, no database information on first tab.

Tried with winmysqladmin to remove the service, then install the service, and still no go...

With the Services window : tried to start is manually and got 'Could not start the Mysql service on local computer. Error 1067:the process terminated unexpectedly'.

So I am uninstalling and re-install mysql...again.
-----------------
[flush]
 
I'm sorry, my mistake. I thought you were saying that winmysqladmin was working.

I checked with winmysqladmin.exe and it confirmed that 'The Server must be connected'.

So I agree with you. Uninstall, clean registry of all mysql remnants.
Then try an install.

If it still doesn't work. This may be another reason for avoiding XP.

Question:
Are you trying to connect to an existing DB you've been using? Or just the default 'mysql' DB?

Did you delete the DB? Are you trying to connect to the new DB that MySQL installs by default in the C:\MySQL\Data directory?

What I'm getting at is; If you're my.ini file still has you connecting to an existing DB located in other than the default location. Try changing my.ini to point to C:\MySQL\Data and then try it.

See if that works. O.K?
tgus

____________________________
Families can be together forever...
 
I didn't clean up the registry before, now I came across ODBC entries with a bunch of MySQL stuff : MySQL ODBC 3.51 TEST DSN and MySQL ODBC 3.51 Driver... So I checked in the Add/remove programs from the control panel and I have MySQL Connector/ODBC 3.51 !!??!? Am I supposed to have that ? Can't remember from win2k if I had it or not...So I removed it and...still won't work. Slight improvement: now winmysqladmin shows a green light but no server information, cannot connect to any databases, the services window show mysql running as a service is fine.

In DOS, mysqld started but cannot connect to it :
C:\mysql\bin>mysqld

C:\mysql\bin>mysqlshow
mysqlshow: Can't connect to MySQL server on 'localhost' (10061)

my.ini:
#This File was made using the WinMySQLAdmin 1.4 Tool
#03/04/2003 3:46:37 PM

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

[mysqld]
basedir=C:/mysql
bind-address=localhost
datadir=C:/mysql/data
language=C:/mysql/share/english
#slow query log#=
#tmpdir#=
port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=root
password=


As for the databases, I'm just trying to connect to the default ones.
I should be able to run MySQL by just running the installer and then winmysqladmin to make the my.ini file, so it must be win xp related...maybe, probably, I think. -----------------
[flush]
 
Seems I can't connect to any MySQL server. I have a web site running on a commercial server that is working, and I used to be able to connect to it. Even with my firewall off I can't connect anymore...

I'll post this now in another forum, but any of you gurus in windows XP that could explain this ? -----------------
[flush]
 
Sometimes Windows XP does not resolve localhost correctly

First check that the service is actually running from services manager in Administrative tools.

Then connect to the server teh following way

c:\mysql\bin\mysql -u root -h 127.0.0.1 -p

Enter the password or just press enter if root password is still not set.


Bye

Qatqat The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
The results:
C:\>c:\mysql\bin\mysql -u root -h 127.0.0.1 -p
Enter password:
ERROR 2003: Can't connect to MySQL server on '127.0.0.1' (10061)

The service is running and Apache2 works fine with localhost. Ping loopback and ping localhost work fine:
C:\>ping localhost

Pinging martin-xp [127.0.0.1] with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

I can stop, restart the mysql service with no problems, mysqladmin shows a green light. I just can't figure out why I can't connect [curse]
-----------------
[flush]
 
I could be wrong, gotta be the firewall.

if you telnet to localhost port 3306 do you get something like

----------------------
5
4.0.12-max-debug-log
------------------------

If not, you can forget about ODBC et cetera as your tcp/ip is being blocked.

Wish I was there to see :)
 
Here are the result from the telnet and web help page:

Code:
C:\mysql\bin>net stop mysql
The MySql service is stopping.
The MySql service was stopped successfully.


C:\mysql\bin>mysqld-nt --remove
Service successfully removed.

C:\mysql\bin>mysqld-nt --install
Service successfully installed.

C:\mysql\bin>net start mysql
The MySql service is starting.
The MySql service was started successfully.


C:\mysql\bin>mysqladmin version
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'

C:\mysql\bin>mysqladmin -h localhost --port=3306 version
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'

C:\mysql\bin>mysqladmin -h 127.0.0.1 --port=3306 version
mysqladmin: connect to server at '127.0.0.1' failed
error: 'Can't connect to MySQL server on '127.0.0.1' (10061)'
Check that mysqld is running on 127.0.0.1 and that the port is 3306.
You can check this by doing 'telnet 127.0.0.1 3306'

C:\mysql\bin>telnet localhost 3306
Connecting To localhost...Could not open connection to the host, on port 3306: C
onnect failed

I have a laptop with Win-XP Pro and did a quick apache2, php431 and MySQL 4012, and within 10 minutes, with all the default setting (changed httpd.conf for php and moved the .dll files to windows/system32), I had both PHP-Nuke and Post-Nuke sites running on the laptop (ok, 20 minutes).

So it must be something I did to this win-xp that is blocking port 3306 or something else is using that port.

I turned off everything firewall related, removed all ODBC MySQL related software (didn't have it on the laptop and it works fine) and still doesn't want to connect.

I will probably give until tonight and then do the big format c: thing, but I really really want to avoid doing this. -----------------
[flush]
 
Check that you have a file USER.MYD that relates to your users under the Mysql\data\mysql directory



if not

restart the server with the following option

c:\net start mysql --skip-grant-tables

Now you should be able to get in by typing

c:\mysql\bin\mysql

If it does not work you have soem other problem in your XPO box


Bye

Qatqat
The reason why my girlfriend can read my thoughts is because mine are properly written! (G.Lepore)
 
USER.MYD is present and looking at it (roughly through wordpad) has the entry for root.

result of net start mysql --skip-grant-tables was the same :
C:\mysql\bin>net start mysql --skip-grant-tables
The MySql service is starting.
The MySql service was started successfully.


C:\mysql\bin>mysqladmin version
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'

Looks like I'll have do a fresh win-xp install... -----------------
[flush]
 
Tried win98 compatibilbity mode (with mysqld and mysql-nt) with no success, always the same can't connect...

Thanks to everybody who helped ! I really appreciated, time to format c:, will let you know how the fresh install works out... -----------------
[flush]
 
Well it took ~5 hours, but everything is working perfectly, re-installed WinXP, post nuke 0723 and php nuke 6.5 running on apache 2, php 431, and mysql 4012...

The only thing I did different from the 1st install, is not touch MyODBC, now everything is ok. -----------------
[flush]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top