MySQL from entry to database deletion (1) MySQL environment construction and teaching video recommendation

 

1. Setting up the MySQL environment

1. Four major versions of MySQL

  • MySQL Community Server community version , open source and free, free to download, but does not provide official technical support, suitable for most ordinary users.

  • MySQL Enterprise Edition Enterprise Edition , requires payment, cannot be downloaded online, and can be tried for 30 days. It provides more functions and more complete technical support, and is more suitable for enterprise customers who have higher requirements on database functions and reliability.

  • MySQL Cluster Cluster Edition , open source and free. Used to set up a cluster server, several MySQL Servers can be packaged into one Server. It needs to be used on the basis of Community Edition or Enterprise Edition.

  • MySQL Cluster CGE Premium Cluster Edition , for a fee.

2. MySQL download and configuration

1) Download address:

Official website address: MySQL

 

 

Find the version you want to download

  • There are two installation programs for MySQL 8.0 installation under Windows

    • mysql-installer-web-community-8.0.26.0.msiDownload program size: 2.4M; network installation components are required during installation.

    • mysql-installer-community-8.0.26.0.msiDownload program size: 450.7M; it can be installed offline during installation. recommend.

  • If the MySQL5.7 version is installed, select Archivesand then select the corresponding version of MySQL5.7. Download the latest MySQL 5.7.34 version here.

I downloaded both MySQL 8 and MySQL 5.7, because before 5.7 was taught by Lao Du, and 8.0 was taught by Master Kong, and I used the former video to get started. The latter video I used to review consolidation.

Because I have installed it, the following content is the content of the MySQL notes of Shang Silicon Valley

2) Installation based on MySQL 8.0 version

After the MySQL download is complete, find the downloaded file and double-click to install it. The specific operation steps are as follows.

Step 1: Double-click the downloaded mysql-installer-community-8.0.26.0.msi file to open the installation wizard.

Step 2: Open the "Choosing a Setup Type" window, which lists 5 installation types, namely Developer Default (default installation type), Server only (only as a server), Client only (only as a Client), Full (full installation), Custom (custom installation). Here select the "Custom (custom installation)" type button, click the "Next (next)" button.

 

Step 3: Open the "Select Products" window, you can customize the list of products to be installed. For example, after selecting "MySQL Server 8.0.26-X64", click the "→" Add button to choose to install the MySQL server, as shown in the figure. Using a generic approach, you can add other products that you need to install.

At this time, if you directly "Next" (next step), the installation path of the product is the default. If you want to customize the installation directory, you can select the corresponding product, and then a hyperlink to "Advanced Options" will appear below.

Clicking "Advanced Options" will pop up the installation directory selection window, as shown in the figure, you can set the MySQL service program installation directory and data storage directory respectively. If not set, the default is in the Program Files directory and the ProgramData directory of the C drive (this is a hidden directory). If you customize the installation directory, please avoid the "Chinese" directory. In addition, it is recommended to store the service directory and data directory separately.

Step 4: After selecting the products to be installed in the previous step, click "Next" to enter the confirmation window, as shown in the figure. Click the "Execute" button to start the installation.

Step 5: After the installation is complete, "Complete" will be displayed under the "Status" list, as shown in the figure.

3) Configure MySQL8.0

After MySQL is installed, the server needs to be configured. The specific configuration steps are as follows.

Step 1: In the last step of the previous section, click the "Next" button to enter the product configuration window.

Step 2: Click the "Next" button to enter the MySQL server type configuration window, as shown in the figure. The port number generally selects the default port number 3306.

Among them, the "Config Type" option is used to set the type of the server. Click the lower triangle button to the right of the option to view 3 options, as shown in the figure.

  • Development Machine(开发机器): This option represents a typical personal desktop workstation. At this time, multiple applications need to be running on the machine, so the MySQL server will occupy the least system resources.

  • Server Machine(服务器): This option represents the server, the MySQL server can run with other server applications, such as web servers, etc. The MySQL server is configured with an appropriate proportion of system resources.

  • Dedicated Machine(专用服务器): This option represents a server that only runs the MySQL service. The MySQL server is configured to use all available system resources.

Step 3: Click the Next button to open the Set Authorization Method window. Among them, the above option is the new authorization method provided by MySQL 8.0, which adopts the SHA256-based password encryption method; the following option is the traditional authorization method (retains the 5.x version compatibility).

Step 4: Click the "Next" button to open the password window for setting the root super administrator of the server, as shown in the figure, you need to enter the same login password twice. You can also add other users through "Add User". When adding other users, you need to specify the username, which host/hosts the username is allowed to log in on, and the user role. Users are not added here for the time being. User management is explained in the MySQL Advanced Features chapter.

Step 5: Click the Next button to open the Set Server Name window as shown. The service name will appear in the Windows service list, and can also be used in the command line window to start and stop the service. This book sets the service name to "MySQL80". If you want to start the service automatically after booting, you can also check the "Start the MySQL Server at System Startup" option (recommended).

Here's how to choose to run the service? You can select one of "Standard System Account" or "Custom User". The former is recommended here.

Step 6: Click the "Next" button to open the Confirm Server Settings window, click the "Execute" button.

 

Step 7: Complete the configuration as shown. Click the Finish button to complete the server configuration.

 

 

Step 8: If there are other products that need to be configured, you can select other products and continue to configure. If not, simply select "Next" to go directly through the entire installation and configuration process.

 

Step 9: End the installation and configuration.

2. Teaching video recommendation

1. Lao Du takes you to learn MySQL

 

I just read Lao Du's MySQL introduction. I can only say that Lao Du's lectures are really reassuring, detailed and passionate. Every time Lao Du talks about the key points, he will "change his voice from tactics", and after watching Lao Du's other courses, you will find that , Lao Du really knows how to teach you java, and I look forward to more Lao Du's courses on the power node.

 

And this course has some topics that can make you more in-depth how to use SQL statements

2. Master Kong's MySQL

 

This tutorial is not only for beginners but also for advanced MySQL. It is very suitable for friends who want to be proficient. It can only be said that it is full of dry goods. I used this tutorial to review and learn the advanced part later. It kills two birds with one stone.

MySQL is actually not difficult, and SQL statements are easier to remember. You can practice more. 

Guess you like

Origin blog.csdn.net/OMGcome/article/details/123483297