MySQL 5.7.18 installation-free configuration tutorial, mysql5.7.18
Install MySQL 5.7.18 without Installation
MySQL is currently the most popular open source database in the world. The core storage of many large factories is often MySQL.
To install MySQL, you can download it from the official website. This tutorial describes how to configure and install the free installation version of MySQL.
Download: https://www.mysql.com/downloads/
Select Download MySQL Community Server and select the corresponding Download based on the number of digits on your computer.
Decompress the package and customize the directory.
MySQL cannot be used immediately after decompression. You need to configure environment variables.
My computer-> properties-> advanced-> Environment Variables
The value of the new MYSQL_HOME variable is the User-Defined directory after downloading and decompressing.
Add the content shown after the system variable. Note the ';' before the content ';'.
After adding the variable, we still cannot start mysql normally because our initial configuration has not been set up, and there is no DATA folder or Initialization Configuration file in your installation directory.
Create a configuration file in the directory and copy the following content.
[client] port=3306 default-character-set=utf8 [mysqld] port=3306 character_set_server=utf8 basedir=D:\mysql-5\mysql-5.7.18-winx64
Extract directory
datadir=D:\mysql-5\mysql-5.7.18-winx64\data
Extract the data directory from the directory
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
MySQL server storage engine
default-storage-engine=MEMORY [WinMySQLAdmin] D:\mysql-5\mysql-5.7.18-winx64\bin\mysqld.exe
Where D: \ mysql-5 \ mysql-5.7.18-winx64 should change to your own installation directory.
And rename it my. ini.
At this time, our initialization preparation file has been written, but since mysql 5.7 does not come with data, we have no default database as the data folder mentioned above. Run the command line in administrator mode. And open it to your own extract directory.
D: \ mysql-5 \ mysql-5.7.18-winx64 \ bin> mysqld-initialize-insecure-user = mysql
At this time, mysql began to create its own data folder.
In command line mode, enter mysql-install
AppearsServer successsfully installedIndicates that the database has been installed.
Enter net start mysql to display that the service is starting and the service is started successfully. Indicates that the database service is started.
Mysql-u root-pOpen Database
Because this is the first time we log on to mysql and log on directly using the Enter key.
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.