Mysql closing immediately after new installation I am using mysql as an backend for my webapp ,the software ran without any glitch but today it
gave unexpectedly ERROR:2003 i tried many solution on the internet but none worked. so reinstalled the mysql software and now its command line closes immediately without even asking for password i am logged in as admin   . This problem is troubling me for the past 5hrs does anybody has a solution
The error (2003) Can't connect to MySQL server on 'server' (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server.

Start by checking whether there is a process named mysqld running on your server host. (Use ps xa | grep mysqld on Unix or the Task Manager on Windows.) If there is no such process, you should start the server. 

If a mysqld process is running, you can check it by trying the following commands. The port number or Unix socket file name might be different in your setup. host_ip represents the IP address of the machine where the server is running.

shell&gt; mysqladmin version
shell&gt; mysqladmin variables
shell&gt; mysqladmin -h `hostname` version variables
shell&gt; mysqladmin -h `hostname` --port=3306 version
shell&gt; mysqladmin -h host_ip version
shell&gt; mysqladmin --protocol=SOCKET --socket=/tmp/mysql.sock version


EDITED

Please go through the link for windows once

EDITED 2

1. Run your cmd as administrator.

2.What you will see is like this
c:\windows\system32&gt;

3.Go to your bin location by using cd..
like C:\mysql\bin(my location of bin in my computer is what you are seeing so chose yours correctly)

4.C:\mysql\bin&gt;mysql --install
  Service successfully installed.

5.C:\mysql\bin&gt;NET START MySql
 The MySql service is starting
 The MySql service was started successfully


Then last step is

6.C:\mysql\bin&gt;mysql -u root - p admin


It will ask for password don't enter anything first time because it will use blank, n just press enter you are done.

N later you can set password too...:)