Home >Database >Mysql Tutorial >Detailed introduction to the installation and use tutorial of mysql5.7.17 (picture and text)
This article mainly introduces MySqlinstallation and usage graphic tutorials in detail. It has certain reference value. Interested friends can refer to it
MySQL is a relational database management system developed by the Swedish MySQL AB company and currently belongs to Oracle. MySQL is a relational database management system. A relational database stores data in different tables instead of putting all data in one large warehouse, which increases speed and flexibility. The SQL language used by MySQL is the most commonly used standardized language for accessing databases. MySQL software adopts a dual authorization policy (this entry "Authorization Policy"), which is divided into community version and commercial version. Due to its small size, fast speed and low total cost of ownership, especially the characteristics of open source, it is generally used by small and medium-sized enterprises. For website development, MySQL is chosen as website database. Due to the excellent performance of its community version, it can form a good development environment with PHP and Apache.
Below I will introduce the process of installing MySQL for reference only.
1. The first step is to download Windows (x86, 64-bit).
2. After downloading, unzip it to the path you want to install. For example, I unzipped it to the path D:\MySql. After unzipping, it should be the folders shown below:
3. Create a new my.ini Configuration file. This configuration file will overwrite the my-default.ini file in the current folder. The display file suffix is set in the previous step. To prepare for this step, open this configuration file and add the following code to the file:
[mysql] # 设置mysql客户端默认字符集 default-character-set=utf8 [mysqld] #设置3306端口 port = 3306 # 设置mysql的安装目录 basedir=D:\MySql # 设置mysql数据库的数据的存放目录 datadir=D:\MySql\data # 允许最大连接数 max_connections=200 # 服务端使用的字符集默认为8比特编码的latin1字符集 character-set-server=utf8 # 创建新表时将使用的默认存储引擎 default-storage-engine=INNODB
4. Save it after adding it, and then create an empty data folder and data file in this path. The folder must be empty. The layout of the entire process should be as shown below:
5. The preliminary preparations have been made, and then the installation of the service will begin as an administrator. Run cmd.exe, remember to run it as an administrator, enter the installation bin directory, the most important and important command is here, it is essential, otherwise the service cannot be started after the service is installed, enter mysqld --initialize -insecure --user=mysql command and press Enter.
#6. Then enter mysqld install to install the service. If the installation is successful, it will prompt that the installation is successful, and then start the MySQL service and it will be OK.
7. Configure environment variables——>Right-click the computer and "Properties"——>"Advanced System Settings"——>"Environment Variables"——> "path"——>Copy the path of the bin directory to the path environment variable.
8. Open MySQL, open cmd.exe, enter the mysql -uroot -p command, there is no password by default, press Enter to enter. If some have already set a password, you need to enter the password to enter. If you have a password, you can use mysql -uroot -p password, or mysql -uroot -p and press Enter to enter the password. The second option is recommended.
This concludes the tutorial on how to install and use mysql. Please forgive me if it is not well written. You are welcome to make criticisms and suggestions!
The above is the detailed content of Detailed introduction to the installation and use tutorial of mysql5.7.17 (picture and text). For more information, please follow other related articles on the PHP Chinese website!