Install mysql under win10 1. Download MySQL from the official websiteWebsite: https://www.mysql.com/downloads/ Scroll down the download page: click the red box below: Follow the instructions below: After downloading, unzip it: The decompressed directory is shown below: 2. Configure environment variables This computer -> Properties -> Advanced system settings -> Environment variables -> path in user variables (double-click) -> Edit (add the bin directory under the mysql installation directory). The specific steps are as follows: 3. Configure the initialization my.ini file (this file does not exist in the newly unzipped directory)my.ini file: The edited content is as follows: [mysqld] # Set port 3306 port=3306 #Set the installation directory of mysql basedir=E:\\tools\\mysql-8.0.23-winx64\\mysql-8.0.23-winx64 #Remember to use double slashes\\, single slashes will make mistakes here #Set the storage directory of mysql database datadir=E:\\tools\\mysql-8.0.23-winx64\\mysql-8.0.23-winx64\\data #The data directory will be automatically created after initialization #The 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=utf8mb4 # 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=utf8mb4 [client] # Set the default port used by the mysql client to connect to the server port = 3306 default-character-set=utf8mb4 4. Install mysql (1) Open cmd and run it with administrator privileges mysqld --initialize --console After the execution is complete, the initial default password of the root user will be printed, for example: The final: ?<M6fpM)i,/q is the initial password (excluding the first space). Before changing the password, you need to remember this password as it will be needed for subsequent logins. (3) Installation service: mysqld --install [service name] If you do not specify a service name, the default service name is mysql. After the installation is complete, you can start the MySQL service through the command net start mysql. net start mysql After success, the following will appear: If unsuccessful, start the service if the following occurs: Try the solution: Visit https://cn.dll-files.com/vcruntime140_1.dll.html and download the latest version of VCRUNTIME140_1.DLL. After downloading, put the unzipped file directly into the bin subdirectory of MySQL. Re-run the command: net start mysql to succeed (4) Stop the service using the command net stop mysql. Uninstall the MySQL service using the command sc delete MySQL or mysqld -remove 5. Change your passwordIn the bin directory, enter: mysql -u root -p You will be prompted to enter a password: fill in the initialization password to enter the MySQL command mode. Execute the command in MySQL: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new password'; Change the password. Note that the ";" at the end of the command must be there. This is the syntax of MySQL and the new password must be enclosed in quotation marks. At this point, the installation and deployment is complete. This is the end of this article about installing mysql8.0.23 under win10 and the solution to the problem of "the service does not respond to control functions". For more relevant content about installing mysql8.0.23 under win10, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: A brief description of the relationship between k8s and Docker
>>: Some questions about hyperlinks
Table of contents Install and introduce axios dep...
When building a website, HTML language may seem un...
Table of contents Manual deployment 1. Create a s...
1. This afternoon, due to the requirements of the...
This article is based on MySQL 8.0 This article i...
1. Background 1. Briefly introduce the shared sto...
Table of contents 1. Three functions of toString ...
Preface If you use the overflow: scroll attribute...
Table of contents Preface 1. Application componen...
1. Introduction Are you still leaving your websit...
Lottie is an open source animation library for iO...
Table of contents Preface 1. Null coalescing oper...
Preface The Windows system that can be activated ...
Related reading: Solve the problem that the servi...
Now, let me ask you a question. What happens when...