How to start mysql server windows

How to start mysql server windows

Chapter 2 Starting the Server for the First Time on Windows

This section gives a general overview of starting the MySQL server. The following sections provide more specific information for starting the MySQL server from the command line or as a Windows service.

The information here applies primarily if you installed MySQL using the noinstall version, or if you wish to configure and test MySQL manually rather than with the GUI tools.

Clients have two options. They can use TCP/IP, or they can use a named pipe if the server supports named-pipe connections.

For information about which server binary to run, see Selecting a MySQL Server Type.

Testing is best done from a command prompt in a console window (or “ DOS window ” ). In this way you can have the server display status messages in the window where they are easy to see. If something is wrong with your configuration, these messages make it easier for you to identify and fix any problems.

The database must be initialized before MySQL can be started. For additional information about the initialization process, see Initializing the Data Directory.

To start the server, enter this command:

For a server that includes InnoDB support, you should see the messages similar to those following as it starts (the path names and sizes may differ):

When the server finishes its startup sequence, you should see something like this, which indicates that the server is ready to service client connections:

The server continues to write to the console any further diagnostic output it produces. You can open a new console window in which to run client programs.

The initial root account in the MySQL grant tables has no password. After starting the server, you should set up a password for it using the instructions in Securing the Initial MySQL Account.

Chapter 2 Starting the Server for the First Time on Windows

This section gives a general overview of starting the MySQL server. The following sections provide more specific information for starting the MySQL server from the command line or as a Windows service.

The information here applies primarily if you installed MySQL using the noinstall version, or if you wish to configure and test MySQL manually rather than with the MySQL Installer.

Clients have two options. They can use TCP/IP, or they can use a named pipe if the server supports named-pipe connections.

For information about which server binary to run, see Selecting a MySQL Server Type.

Testing is best done from a command prompt in a console window (or “ DOS window ” ). In this way you can have the server display status messages in the window where they are easy to see. If something is wrong with your configuration, these messages make it easier for you to identify and fix any problems.

The database must be initialized before MySQL can be started. For additional information about the initialization process, see Initializing the Data Directory.

To start the server, enter this command:

You should see messages similar to those following as it starts (the path names and sizes may differ). The ready for connections messages indicate that the server is ready to service client connections.

You can now open a new console window in which to run client programs.

The initial root account in the MySQL grant tables has no password. After starting the server, you should set up a password for it using the instructions in Securing the Initial MySQL Account.

How to start mysql server windows

This section gives a general overview of starting the MySQL server. The following sections provide more specific information for starting the MySQL server from the command line or as a Windows service.

The information here applies primarily if you installed MySQL using the noinstall version, or if you wish to configure and test MySQL manually rather than with the MySQL Installer.

Clients have two options. They can use TCP/IP, or they can use a named pipe if the server supports named-pipe connections.

For information about which server binary to run, see Section 1.4.3, “Selecting a MySQL Server Type”.

Testing is best done from a command prompt in a console window (or “ DOS window ” ). In this way you can have the server display status messages in the window where they are easy to see. If something is wrong with your configuration, these messages make it easier for you to identify and fix any problems.

The database must be initialized before MySQL can be started. For additional information about the initialization process, see Initializing the Data Directory.

To start the server, enter this command:

You should see messages similar to those following as it starts (the path names and sizes may differ). The ready for connections messages indicate that the server is ready to service client connections.

You can now open a new console window in which to run client programs.

The initial root account in the MySQL grant tables has no password. After starting the server, you should set up a password for it using the instructions in Securing the Initial MySQL Account.

How to start mysql server windows

On Windows, the recommended way to run MySQL is to install it as a Windows service, so that MySQL starts and stops automatically when Windows starts and stops. A MySQL server installed as a service can also be controlled from the command line using NET commands, or with the graphical Services utility. Generally, to install MySQL as a Windows service you should be logged in using an account that has administrator rights.

The Services utility (the Windows Service Control Manager ) can be found in the Windows Control Panel. To avoid conflicts, it is advisable to close the Services utility while performing server installation or removal operations from the command line.

Installing the service

Before installing MySQL as a Windows service, you should first stop the current server if it is running by using the following command:

Users in the MySQL grant system are wholly independent from any operating system users under Windows.

Install the server as a service using this command:

The service-installation command does not start the server. Instructions for that are given later in this section.

To make it easier to invoke MySQL programs, you can add the path name of the MySQL bin directory to your Windows system PATH environment variable:

Next select the Advanced tab from the System Properties menu that appears, and click the Environment Variables button.

You should not add the MySQL bin directory to your Windows PATH if you are running multiple MySQL servers on the same machine.

You must exercise great care when editing your system PATH by hand; accidental deletion or modification of any portion of the existing PATH value can leave you with a malfunctioning or even unusable system.

The following additional arguments can be used when installing the service:

For a MySQL server that is installed as a Windows service, the following rules determine the service name and option files that the server uses:

As a more complex example, consider the following command:

You can also specify options as Start parameters in the Windows Services utility before you start the MySQL service.

Starting the service

After a MySQL server instance has been installed as a service, Windows starts the service automatically whenever Windows starts. The service also can be started immediately from the Services utility, or by using an sc start mysqld_service_name or NET START mysqld_service_name command. SC and NET commands are not case-sensitive.

Removing the service

For more information about stopping or removing a Windows service, see Section 5.8.2.2, “Starting Multiple MySQL Instances as Windows Services”.

How do I start a MySQL server on Windows?

I’ve installed a MySQL server onto my computer and when I first installed it, it ran automatically. Now I’ve restarted my computer it is no longer running. What file do I need to run to get it back up and running again?

I’ve tried running MySQL 5.6 Command Line Client and mysqld.exe from the Program Files/MySQL/MySQLServer/bin directory, and I’ve had no luck.

Upon running mysqld.exe, I get the following error:

Naturally, I tried running it as administrator, and I got this:

How to start mysql server windows. Смотреть фото How to start mysql server windows. Смотреть картинку How to start mysql server windows. Картинка про How to start mysql server windows. Фото How to start mysql server windows

5 Answers 5

How to start mysql server windows. Смотреть фото How to start mysql server windows. Смотреть картинку How to start mysql server windows. Картинка про How to start mysql server windows. Фото How to start mysql server windows

If you installed MySQL using the MSI installer, it should be set up as a service.

You can open the service in two ways

METHOD #1: Access the Installed Service

METHOD #2: Command Line Execution

If you get this error

then you didn’t run the DOS Window as Administrator. Try again as administrator. You should see:

Give it a try.

How to start mysql server windows. Смотреть фото How to start mysql server windows. Смотреть картинку How to start mysql server windows. Картинка про How to start mysql server windows. Фото How to start mysql server windows

If you are using wamp on windows, you can start mysql from command line by :

This assumes that you have installed wamp at the root

How to start mysql server windows. Смотреть фото How to start mysql server windows. Смотреть картинку How to start mysql server windows. Картинка про How to start mysql server windows. Фото How to start mysql server windows

In order to start manually the mysql serve you must run the mysqld executable. Open the command prompt and type:

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *