Mysql.exe will not stay open

I am completely new to this.

I’m trying to install MySQL and PHP on my Windows XP computer.

I have followed Kevin Yank’s book, followed another tutorial, reinstalled Windows XP twice on this machine, installed MySQL and PHP many times (after uninstalling). I’ve tried installing on an other machine.

“Dr. John” and “Mainlink” suggested that I “use xampplite to install apache, mysql, php etc” - I tried this, after a reinstalling Windows XP.

All works well, including the PHP test (“today.php”), till I try to open “mysql.exe”. The “command prompt/dos” window flashes up, then disappears immediately.

Can anyone please point me in the right direction?



Try going to MySQL client directory using cmd.exe and running:

mysql -u root

Are you not able to access the mysql client from the programs menu…

Strange thing is that it was behaving just 2 hours ago - I was about to declare victory and thank you all. Now, it’s up to its usual tricks:

Hi earl-grey,
thanks for your response.
I tried: start > run, then typed in “cmd.exe”,
(this got me to: C:\WINDOWS\System32\cmd.exe screen).
I then entered “mysql -u root”.
I got a response: “ERROR 2003 (HY000): Can’t connect to MySQL server on ‘Localhost’ (10061)”.
I also tried the same input in the Command Prompt window, with the same result.
Can you make any sense of this?

Hi themightystephen,
thanks also for your response today.
I am able to get the screen via start > All Programs > MySQL > MySQL Server 4.1 > MySQL Command Line Client. (Thanks, I did not know that this route was available).
It give a prompt: “Enter password:”
Problem is that, when I enter my password and hit return, it beeps and the window disappears.
(My theory: the computer knows that I have no clue - kind of like a horse that knows if its rider is terrified).
I hope that you can make more sense of it.


Right click on the item in the start menu, and go to Properties, check out there, what command does it run when you click on it, and then try executing it from cmd.exe

Thanks earl-grey.
After my last posting, I restarted my computer (for the thousandth time) - I got straight into MySQL.
Strangely, when I go to C:\mysql\bin and click on mysql.exe, I get right to the prompt: “mysql>” (No password required) ?!
When I use themightystephen’s route (start > All Programs > MySQL > MySQL Server 4.1 > MySQL Command Line Client), it prompts for the password.
Is this normal?
Meanwhile, it is behaving reasonably well, so I’m going to wing it till it gets nasty on me again. Then I’ll try your suggestion and get back to you.
Thanks again for your attention.