Mysql 5.7. 19 winx64 ZIP Archive Installation and Use Process Summary
- 2021-09-05 01:09:20
- OfStack
Today, I learned to install MySQL, and there were some problems in the process. After checking several related articles, I solved them and recorded them for your reference.
Step 1 Download
https://dev.mysql.com/downloads/mysql/
https://www.ofstack.com/softs/451120.html
Choose the version suitable for yourself, Archive means that it can be decompressed directly after downloading, and it is convenient to install it.
2. Create a new file my. ini under the root directory of MySQL (which was not available before), and add the following contents to the file.
[mysql]
# Settings mysql Client default character set
default-character-set=utf8
[mysqld]
# Settings 3306 Port
port=3306
# Settings mysql Installation directory of
basedir=E:\Databases\mysql\mysql-5.7.19-winx64
# Settings mysql The storage directory of the data in the database
datadir=E:\Databases\mysql\mysql-5.7.19-winx64\data
# Maximum number of connections allowed
max_connections=200
# The character set used by the server defaults to 8 Bit coded latin1 Character set
character-set-server=utf8
# Default storage engine to be used when creating new tables
default-storage-engine=INNODB
# Password-free login
skip-grant-tables
I added the last line later, because I need a password when I log in, but I don't know, and then I added the last sentence in my. ini file, so I can log in without a password.
3. Find the path of Path, bin to add mysql in the environment variable.
For example, mine is: "; E:\ Databases\ mysql\ mysql-5. 7.19-winx64\ bin"
4. Run cmd as an administrator, 1 must run as an administrator, and you can view your own system as an administrator.
5. Run the following command
mysqld --initialize
mysqld install
net start mysql
mysql -u -root
Summarize