Home >Database >Mysql Tutorial >Share a green version of mysql installation tutorial
In database applications, MySQL is one of the most popular open source databases. It has the characteristics of high speed, ease of use and stability. Although the installation of MySQL is not very difficult, some novices may encounter some problems with some details. The following introduces a green version of MySQL installation method.
First, we need to download the green version of MySQL. You can find various versions and platforms of MySQL on the MySQL official website download page, and you can choose to download according to your needs and operating system version. For this tutorial, we choose MySQL 5.7 version and download the green version zip package.
After downloading MySQL, unzip the file and name the decompressed folder MySQL or another name you like, such as mysql -5.7.
After completing the folder renaming, you need to add the MySQL address path to the environment variable to facilitate subsequent operations. Taking the Windows system as an example, right-click "My Computer" - "Properties" - "Advanced System Settings" - "Environment Variables", find the "System Variables" column, find the "Path" variable in it, and click the Edit button Add the decompressed MySQL address path and save it.
Before starting to install MySQL, you need to configure the MySQL default port and password to ensure more secure and stable use. MySQL.
Find the my.ini file in the MySQL folder, edit the [mysqld] part, and set the MySQL service port number, for example, change port=3306 to port=5000. In the [mysql] section, find the password item and change it to your password, such as password=123456.
Then find the bin directory of the folder where MySQL is located, hold down the Shift key and right-click a blank space, select "Open command window here" (or select "Open Power Shell window here"), enter mysqld -install and press Enter to install the MySQL service. If you have not configured environment variables, you need to access them through the full path. For example: C:\mysql\bin\mysqld --install.
There are many MySQL connection tools, such as MySQL Workbench, navicat for MySQL, heidisql, mysql shell (command line connection method). Here, take MySQL Workbench as an example. Open MySQL Workbench and click the "New Connection" button. A window will open. Select the connection type as "MySQL", enter the host name as "localhost", the input port as "5000", and the user name as " root" (administrator account), the password is "123456" (the password configured by yourself), as shown below:
After completing the above steps, that is You can complete the installation of the basic MySQL green version, and happily use MySQL to write your database applications!
The above is the detailed content of Share a green version of mysql installation tutorial. For more information, please follow other related articles on the PHP Chinese website!