mysql5.7 Boot report system error 2

Source: Internet
Author: User

1. http://dev.mysql.com/downloads/mysql/Download mysql5.7 Zip package

2.

Download good after extracting files, unzip the content, you can extract the content to the desired location, the cases urealyticum pressure to "D:\phpweb\mysql", there is a problem new version of the folder without the data name, this folder, as the name implies, is to put the file, you can put in any other place, You think the convenient location, as long as the following configuration on the path is good, here I still put under "D:\phpweb\mysql".

Second Step: Configure the My.ini file now
    1. Open the file with Notepad My-default.ini, some friends may like to create their own new My.ini file, please help yourself, I still use the default file to change. Before and after the most basic configuration

      1, remove Basedir and DataDir front of the #

      2, Basedir added is the decompression path of MySQL;

      3, DataDir added is the MySQL Data folder path.

      4, Port = 3306 Set the dedicated database server and port 3306, there is a conflict can choose to modify

      PS: in order to avoid the long forget the version number, I put the version number remarks in the My-default.ini inside, please forgive my memory is not good, some people like to put the version number in the root directory of the folder name,

      Third big step: adding environment Variables
    2. Add the path of the bin to the value of the path variable, remembering to append to the last, not overwrite.

      Here's how:

      1, in order to prevent errors, copy the path of the Bin folder in the address bar, such as the example "D:\phpweb\mysql\bin"

      2. Open Computer Desktop: computer, right---Properties, advanced system settings, advanced systems, environment variables (N), System variables (S), find variable path-> edit;

      3. After adding the path variable value to the MySQL bin path you just copied.

      PS: Note here that the different paths are in English ";" Separate) OK, exit.

  1. Step Four: Install the initialization database

    1. Run cmd as administrator (be sure to run as administrator, or not have enough permissions),

    2, enter: D: [carriage return] (because in the D drive, to go to the D drive first)

    3, input: cd D:\phpweb\mysql\bin [Enter] into the bin folder of MySQL (regardless of whether you have configured the environment variable, also to enter the Bin folder, or after the start of the service will still report error 2)

    4. Input: mysqld--install [carriage return] (This command is to install the service, after the execution, prompt English success, this time you can see in your Windows Service MySQL service, but did not start.) )

    5, input: mysqld--initialize--console This step is important , this is the initialization database , and then you can see in the final initialization of an [email protected]: There is a series of alphanumeric symbols behind it, which is the random password that MySQL automatically generates for you, be sure to write it down and use it when we log in to the MySQL database.

    PS: use-initialize generate random password, use-initialize-insecure generate blank password, initialize Data folder will be generated automatically, do not create a new OH.

  2. Step five: Start the MySQL service

    Start the MySQL service before you can use the MySQL database. There are two ways to start MySQL:

    Method One: Start the input with the command: net start MySQL [Enter]

    Method Two: Start from the Windows service

    Now we're ready to use MySQL.

    Step six: Log in to MySQL database and modify the hard-to-remember random password automatically

    Log in to MySQL database command

    Input: mysql-uroot-p [Return]

    Ask you to enter the password, the MySQL generated a random password input, and then enter, landed in, into the database we can change the password

    The command to change the password is as follows:

    SET PASSWORD = PASSWORD (' Your new password ');

    PS: before mysql-5.6.*, update the root password directly with the UPDATE statement. In mysql-5.7.12, the System User table does not have password this column, this method is not used in mysql-5.7.12, we can only use SET password = password (' Your new password '); To change the password.

    OK, the installation is over, the need for a graphical interface of friends themselves to find the right favorite.

    ====================================================================================================== "MySQL"-- A system error 2 solution occurred

    The above operation, after completion, restart the MySQL ("Net Startmysql") service, or not, reported the same error.

    Later, switch to the bin directory. Note here: When installing the MySQL service, be sure to switch to the bin directory of the MySQL installation directory. After switching to the bin directory, first remove the previously installed MySQL service, then reinstall the MySQL service and then start.

mysql5.7 Boot report system error 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.