[Reproduced] The first use of Mysql, which is free of installation, is easy to use by pro-testing

MySQL is a relational database management system, the SQL language used is the most commonly used to access the database

Standardized language, which is characterized by small size, fast speed, low total cost of ownership, especially the feature of open source , in the Web

In terms of application, MySQL is the best RDBMS (Relational Database Management System: relational data

Library management system) one of the application software.

  In this blog post, I mainly take Mysql installation-free version as an example to help you solve the steps of installing and configuring mysql.

  First of all: first enter the mysql official website (Mysql official website --> https://www.mysql.com/ ), the following are the detailed steps: ↓

  (In order to facilitate your operation, there is an installation package in my network disk:

    Link: https://pan.baidu.com/s/1vP-D71PmMsXhLwO8y2lL9A
    extraction code: n4mt
  )

1. Download the installation package:

  ①After entering the official website, click "Dowload", and then the page will drop down

  

  ②The next page is like this, the link in the red box is the mysql community version, which is a free mysql version, and then we click on the link in this box: ↓

 

  

 

    ③Next jump to this page, here, we only need to download the community version of Server: ↓

 

 

  ④Download the free installation version (except for systems other than windows)

 

 

    ***In this way, the installation package is downloaded!

  ***Attention, the installation directory should be placed in the specified location, and secondly, avoid Chinese in the absolute path. It is recommended to prefer English as the naming condition! ! ! ! (Mine is for reference)

  

  

 

 

Two, Mysql configuration

  * Open the command line as an administrator (as shown in the figure below), and you must be an administrator, otherwise an error will occur because some of the subsequent commands require permissions!

  

  

  ① Go down to the bin directory of mysql:

  

 

  ②Install mysql service: mysqld --install

  

 

  ③Initialize mysql. Here, initialization will generate a random password, as shown in the box below, remember this password, and you will use it later (mysqld --initialize --console)

  

 

  ④Open mysql service (net start mysql)

  

 

  ⑤ Login verification, whether mysql is installed successfully! (Note that the random password generated above does not include the space in front of the preceding symbol, otherwise it will fail to log in). If it is the same as shown in the figure below, it means that your mysql has been installed successfully! Note, you must open the service first, otherwise the login will fail and a prompt will appear that denies access! ! !

  

 

  change Password:

    Because the random password generated during initialization is too complicated for us to log in to mysql, we should modify a password that we can remember! !

  

 

  Login again to verify the new password:

  

 

  Set the system's global variables:

    In order to facilitate the login and operation of mysql, here we set a global variable: ↓

    ① Click "My Computer"-->"Properties"-->"Advanced System Settings"-->"Environment Variables", and then operate as shown in the figure below

    

 

    ②Add the newly created mysql variable to the Path variable, and click OK to complete:

 

    After the configuration is complete, whenever we want to use mysql with the command line, we only need win+R, --> enter "cmd" to open the command line, and then enter the login sql statement.

    ③Create an ini or cnf configuration file in the mysql directory, here I create an ini configuration file, the code written in it is some basic configuration of mysql

    

In this way, an installation-free version of Mysql is installed and configured

 

2.1 Possible problems

 1、ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES) 

 2. "Cannot continue to execute the code because MSVCR120.dll cannot be found. Reinstalling the program may solve this problem" or "Cannot continue to execute the code because VCRUNTIME140_1.dll cannot be found. Reinstalling the program may solve this problem" 

Solution : Transfer to my other two blogs

1、ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES)  

2. Solve the mysql problem: Because MSVCR120.dll cannot be found, the code cannot be executed. Reinstalling the program may solve this problem. 

2.2 Command reference:

①Installation   service: mysqld --install

  ② Initialization:  mysqld --initialize the --console

  ③Start the service: net start mysql

  ④Close the service: net stop mysql

  ⑤Log in to mysql: mysql -u root -p

    Enter PassWord: ( password )

  ⑥Modify the password: alter user'root'@'localhost' identified by'root'; (by followed by the password)

  ⑦Mark to delete mysql service : sc delete mysql

 

[Reprint address]: https://www.cnblogs.com/winton-nfs/p/11524007.html

 

Guess you like

Origin blog.csdn.net/xunye_dream/article/details/112724689