This article records the specific method of installing and configuring MySQL 8.0.16 winx64. The specific contents are as follows Download address of the latest mysql installation package After the installation package is unzipped, it looks like this: You can put it in other folders at will After decompressing to the C drive, there will be a file named C:\Program Files\mysql-8.0.16-winx64. Click to enter and view the subdirectories under this folder as follows: In Windows, a black cmd window appears, and it is recommended to open it as an administrator. In command line mode, enter the bin subdirectory in the MYSQL installation directory, C:\Program Files\mysql-8.0.16-winx64\bin, as shown in the figure: Then enter the installation command mysqld -install in the C:\Program Files\mysql-8.0.16-winx64\bin directory. It is relatively simple so I won’t take a screenshot. If there is an error, please open the black window as an administrator. After executing, a data folder will be generated in the MYSQL decompression directory C:\Program Files\mysql-8.0.16-winx64, which contains a file ending with .err. This file contains a temporary random password generated when MYSQL is used for the first time. Open this .err file in Notepad and you can find the random password (root@localhost: 'password') . You can also execute mysqld --initialize --console to generate a random password, which will be printed to the console and saved somewhere. Then configure the MYSQL startup file, create a .ini format file my.ini in the MYSQL decompression directory C:\Program Files\mysql-8.0.16-winx64, and then open it in Notepad format and write the following code: just copy and paste and save Note that you need to change your path [mysqld] # Set port 3306 port=3306 # Set the installation directory of mysql basedir=C:\Program Files\mysql-8.0.16-winx64 # The directory where the database data is stored (do not create this Data directory manually, otherwise an error will be reported) datadir=C:\Program Files\mysql-8.0.16-winx64\Data # Maximum number of connections allowed max_connections=200 # The number of connection failures allowed. This is to prevent someone from trying to attack the database system from this host max_connect_errors = 10 # The default character set used by the server is UTF8 character-set-server=utf8 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB # By default, the "mysql_native_password" plug-in is used for authentication. default_authentication_plugin=mysql_native_password [mysql] # Set the default character set of the mysql client to default-character-set=utf8 [client] # Set the default port used by the mysql client to connect to the server port = 3306 default-character-set=utf8 Then enter the following command in the bin directory: mysqld -install service name (customized, you can use mysql8, mysql) Start the service: net start mysql Log in to MySQL: The password is the random password above mysql -u root -p 1 Change password: 1 is not available, use 2, choose one (2 is the only option for the new version) set password for root@localhost=password('password'); 2 Change password: alter user 'root'@'localhost' identified by 'password'; Finally configure the environment variables Wonderful topic sharing: MySQL different versions installation tutorial MySQL 5.7 installation tutorials for various versions MySQL 5.6 installation tutorials for various versions mysql8.0 installation tutorials for various versions The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
>>: Implementation of Bootstrap web page layout grid
Find the problem I recently migrated the storage ...
Songti: SimSun Bold: SimHei Microsoft YaHei: Micr...
Method 1: Use the target event attribute of the E...
1. This afternoon, due to the requirements of the...
⑴ Content determines form. First enrich the conten...
Original data and target data Implement SQL state...
Three MySQL instance processes are started on one...
Table of contents Configuration command steps in ...
This article introduces the effect of website pro...
I installed redis today and some errors occurred ...
summary In some scenarios, there may be such a re...
Moreover, an article website built with a blog pro...
MySQL temporary tables are very useful when we ne...
<META http-equiv="Page-Enter" CONTENT...
There are too much knowledge to learn recently, a...