[mysql] How to start MySQL server on windows xp

Whenever I try to start MySQL by typing

> mysql -u root

I get the error

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

How can I solve the problem above? I just downloaded MySQL and unzipped it in the E: drive. I have not done anything else. Do I have to make a connection first? If so, how can I do that?

This question is related to mysql windows-xp mysql-error-2003

The answer is


I tried following steps to run mysql server 5.6 on my windows 8.

  1. Run command prompt as an administrator
  2. go mysql server 5.6 installation directory (in my case: C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin) copy that location
  3. In Command prompt run "cd C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin"
  4. run "mysql -u root"

probably this will help you I was also having problem with starting MySql server but run command as mention right mark in picture . Its working fine .


If the command prompt does not work in Windows, try the following:

1) Open services in Windows.

2) Then check the status for Mysql and if you found status nothing or blank then start the mysql service.

MYSQL SERVICE STATUS ON Windows service manager

3) After then see whether the mysql is start or not .If it shows started then try to check mysql working.

It has worked for me when cmd commands were not working.


mysql -u root -p

After entering this command in terminal, it will ask for password Enter the password and you are ready to go!


You also need to configure and start the MySQL server. This will probably help


first thing you need to do is to start the mysql for that you can use E:\mysql-5.1.39-win32\bin>net start mysql (only when there a mysql running as service) then you can execute E:\mysql-5.1.39-win32\bin>mysql -u root


use the command "mysql -u root -p" in the bin folder path. and give the MY SQL password which you have set earlier.


The error complains about localhost rather than permissions and the current practice in MySQL is to have a bind-address specifying localhost only in a configuration file.

So I don't think it's a password problem - except that you say you 'unzipped' MySQL.

Is that enough installation? What did you download?

Was there any installation step which allowed you to define a root password?

And, as NawaMan said, is the server running?


there is one of the best solution do resolve this problem and it is going to work 100%. as we know that server is a process so treat it like a process go to the task manager in windows and see for services in task manager in that service see for Mysql and MS80 and try to start it manually by click on it and say run then will take some time.

go to your mysql workbench and click on start/shutdown then try to refresh the server status in server status option. it will load up thats it.


  1. Run the command prompt as admin and cd to bin directory of MySQL

    Generally it is (C:\Program Files\MySQL\mysql-5.6.36-winx64\bin)
    
  2. Run command : mysqld --install. (This command will install MySQL services and if services already installed it will prompt.)

  3. Run below commands to start and stop server

    To start : net start mysql

    To stop : net stop mysql

  4. Run mysql command.

  5. Enjoy !!


Start mysql server by command prompt

C:> "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --console

Or alternative reach up to bin then

mysqld --console

It will start your server.

If you have mysql command line client available

click on it

it show enter your password :

Please enter your password.

Then you can access it.


Here is the ZIP file that I had downloaded: mysql-5.7.15-winx64.zip

Here are the steps to start MYSQL Server (mysql-5.7.15-winx64) for the first time on Windows:

  1. Create a new folder named "data" in MYSQL installation directory (i.e. in the same location as where "bin" directory is located. For me it is: C:\programs\mysql-5.7.15-winx64\mysql-5.7.15-winx64. This location will vary as per the location where you have extracted the MYSQL zip file)
  2. From here I will use my MYSQL folder location as reference. Go to: C:\programs\mysql-5.7.15-winx64\mysql-5.7.15-winx64\bin and execute the command: mysqld --initialize-insecure or mysqld --initialize depending on whether you want the server to generate a random initial password for the 'root'@'localhost' account.
  3. To start the DB, go to: C:\programs\mysql-5.7.15-winx64\mysql-5.7.15-winx64\bin and execute mysqld --console You can see the start-up logs being printed.
  4. To connect to DB, go to: C:\programs\mysql-5.7.15-winx64\mysql-5.7.15-winx64\bin and execute mysql -u root -p. When prompted, Enter password if it has been set or else just hit "Enter" button to connect

maybe

E:\mysql-5.1.39-win32\bin>mysql -u root -p

  • Run your command prompt as administrator.#

We can start MySQL service from windows command line using the below command.

  • net start mysql

Command to stop MySql service:

  • net stop mysql

Disable MySql service:

  • sc config mysql start= disabled

Command to enable MySql service(to automatically start MySQL service when the system starts up):

  • sc config mysql start= auto

Command to set the startup type to manual:

  • sc config mysql start= manual

How to restart MySql service? There is no direct command to restart a service. You can combine stop and start commands like below.

  • net stop mysql & net start mysql

You need to run the server first. The command you use (in the question) starts a client to connect to the server but the server is not there so there the error.

Since I am not a Windows user (Linux comes equipped) so I might not be the best person to tell you how but I can point to you to a guide and another guide that show you how to get MySQL server up and running in Windows.

After you get that running, you can use the command (in the question) to connect it.

NOTE: You may also try http://www.apachefriends.org/en/xampp.html if you plan to use MySQL for web database development.

Hope this helps.


Type

C:\> "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --console

to start the sql server and then test the client connection.


I was using MySQL Server 5.5 as a result I was missing the folder which majority of the answers made mention of in the bin folder. What I did instead was the following:

  1. Open Explorer and make your way to C:\Program Files\MySQL\MySQL Server 5.5\bin or your MySQL installation directory.
  2. Run the executable application MySQLInstanceConfig and follow the images below.

This solved my issue and I was able to access the database without any errors.


Examples related to mysql

Implement specialization in ER diagram How to post query parameters with Axios? PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver' phpMyAdmin - Error > Incorrect format parameter? Authentication plugin 'caching_sha2_password' is not supported How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Connection Java-MySql : Public Key Retrieval is not allowed How to grant all privileges to root user in MySQL 8.0 MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

Examples related to windows-xp

installing JDK8 on Windows XP - advapi32.dll error How to Create a script via batch file that will uninstall a program if it was installed on windows 7 64-bit or 32-bit How do I find files with a path length greater than 260 characters in Windows? Apache Maven install "'mvn' not recognized as an internal or external command" after setting OS environmental variables? How to access share folder in virtualbox. Host Win7, Guest Fedora 16? How to create ls in windows command prompt? How to fix an UnsatisfiedLinkError (Can't find dependent libraries) in a JNI project How to use random in BATCH script? How to delete or change directory of a cloned git repository on a local computer How do I manually create a file with a . (dot) prefix in Windows? For example, .htaccess

Examples related to mysql-error-2003

Access mysql remote database from command line ERROR 2003 (HY000): Can't connect to MySQL server (111) ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111) How to start MySQL server on windows xp Can't connect to MySQL server error 111