Windows mysql5.6 free installation version

  1. There are two types of MySQL installation files, one is in msi format and the other is in zip format. If it is in msi format, you can directly click to install and install it according to the installation prompts it gives (I believe everyone can understand English prompts in English). Generally, MySQL will be installed in the directory C:\Program Files\MySQL\MySQL Server 5.6 Medium; the zip format is decompressed by itself. After decompression, MySQL can be used, but it needs to be configured.

  2.  

    After decompression, you can rename the folder and put it in a suitable location. Personally, it is recommended to rename the folder to MySQL Server 5.6 and put it in the C:\Program Files\MySQL path. Of course, you can put it anywhere you want.

    MySQL 5.6 for Windows decompressed version configuration installation
  3.  

    After completing the above steps, many users start using MySQL, but the error shown in the figure appears. This is due to no environment variables being configured. Configuring environment variables is simple:

    My Computer -> Properties -> Advanced -> Environment Variables

    Select PATH and add: the path of your mysql bin folder (eg: C:\Program Files\MySQL\MySQL Server 5.6\bin )

    PATH=.......;C:\Program Files\MySQL\MySQL Server 5.6\bin (note that it is appending, not overwriting)

    MySQL 5.6 for Windows decompressed version configuration installation
    MySQL 5.6 for Windows decompressed version configuration installation
  4.  

    Don't start mysql after configuring the environment variables, we also need to modify the configuration file (if there is no configuration, the error in the figure will appear when starting!: Error 2 The system cannot find the file), mysql-5.6 .1X The default configuration file is in C:\Program Files\MySQL\MySQL Server 5.6\my-default.ini, or create a my.ini file yourself,

    Modify or add configuration in it (as shown in the figure): 

    [mysqld] 

    basedir=C:\Program Files\MySQL\MySQL Server 5.6 (the directory where mysql is located) 

    datadir=C:\Program Files\MySQL\MySQL Server 5.6\data (the directory where mysql is located\data)

    MySQL 5.6 for Windows decompressed version configuration installation
    MySQL 5.6 for Windows decompressed version configuration installation
    MySQL 5.6 for Windows decompressed version configuration installation
  5.  

    Run cmd as an administrator (be sure to run it as an administrator, otherwise the permissions are not enough),

    Enter: cd C:\Program Files\MySQL\MySQL Server 5.6\bin to enter the bin folder of mysql (regardless of whether the environment variable has been configured, also enter the bin folder, otherwise the service will still report error 2 after starting the service)

    Enter mysqld -install (if you don't run it as an administrator, you will get an error due to insufficient permissions: Install/Remove of the Service Denied!) 

    Successful installation

    MySQL 5.6 for Windows decompressed version configuration installation
    MySQL 5.6 for Windows decompressed version configuration installation
  6.  

    After the installation is successful, you need to start the service. Continue to enter: net start mysql in cmd (as shown in the figure). The service starts successfully!

    At this point, many people will have errors, please see the note:

    Note: Error 2 and Error 1067 often appear at this time.

    If "Error 2 The system cannot find the file" appears, check whether the configuration file has been modified or whether you have entered the bin directory to operate. If the configuration file has been modified correctly and entered the bin folder, you need to delete mysql first (input mysqld -remove) Reinstall (input mysqld -install);

    If there is an error 1067, it is the configuration file modification error, confirm whether the configuration file is correct.

    MySQL 5.6 for Windows decompressed version configuration installation
  7.  

    After the service is successfully started, you can log in, as shown in the figure, enter mysql -u root -p (the first login has no password, just press Enter), the login is successful!

    END

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326455265&siteId=291194637