I have seen many relevant tutorials on the Internet, but there are still some errors in the installation process. I simply sorted them out and summarized my own mysql5.7.20 installation process for your reference. (To be honest, there are often inexplicable problems with the configuration environment) 1. Download address: Official address Download the mysql version that suits you according to your computer. What I downloaded is shown in the picture, and my installation process is also based on this. 2. After downloading, unzip it to a custom path, and make sure there is no Chinese text. 3. After decompression, create a new ini file named my. The content of my is: [mysql] # Set the default character set of the mysql client to default-character-set=utf8 [mysqld] #Set port 3306 port = 3306 # Set the installation directory of mysql basedir=D:\KQQ\mysql-5.7.20-winx64 # Set the storage directory of mysql database data datadir=D:\KQQ\mysql-5.7.20-winx64\data # Maximum number of connections allowed max_connections=200 # The default character set used by the server is the 8-bit latin1 character set character-set-server=utf8 # The default storage engine that will be used when creating a new table default-storage-engine=INNODB As shown in the figure: 4. Configure environment variables to avoid having to execute in the bin directory under the installation directory every time. The configuration process is as follows: - Right-click My Computer, select Properties, Advanced Settings, Environment Variables, edit the path variable, add the address of the bin directory, and separate it with ; before other addresses. As shown in the figure: 5. After the configuration is complete, run cmd as an administrator. The specific steps are as follows: In the C drive, find cmd.exe in the System32 file in the Windows folder, right-click and run as administrator **6. First switch the directory to the bin directory of your MySQL installation directory, then enter mysqld in the cmd window 7. Press Enter to run the install. Note: You need to run cmd as an administrator. ** As shown in the figure: 8. Then enter mysqld –initialize-insecure –user=mysql (After executing the above command, MySQL will create a data folder and a default database. The default username is root and the default password is empty. 9. Start the mysql service: Enter net start mysql to start the service, OK success Login/enter mysql database In the cmd window, enter: mysql -u root –p , press Enter, and when enter password appears, press Enter again. As shown in the figure: Because no user name and password are set during installation, the default login user name is root and the password is blank. -u command: used to specify the user name used when connecting to the database. -p command: used to specify the password entered by the user Initialization password When the root user logs in to MySQL, //Use database use mysql; //The password is haha, custom update user set authentication_string=PASSWORD("haha") where user="root"; //Update permissions flush privileges; //Exit mysql quit; Since I just set a password. Reopen mysql. At this point, the database password change is complete. Next, we will introduce the common commands of the database. : : : : : : : : : : : : : : : show variables like '%storage_engine%';--View the current default storage engine of MySQL show create table tablename;--View the storage engine used by a table (the "ENGINE=" part of the result) alter table tablename ENGINE=InnoDB--Modify the engine create table tablename(fieldname1 fieldtype1,fieldname2 fieldtype2,..) ENGINE=engine_name;--Set the storage engine when creating a table Wonderful topic sharing: Installation tutorials for different versions of MySQL Installation tutorials for MySQL 5.7 versions Installation tutorials for MySQL 5.6 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:
|
<<: WeChat applet learning wxs usage tutorial
>>: How to use CSS custom variables in Vue
1. Grammar: <meta name="name" content...
In the previous article, we introduced how to for...
background: I have done a project before, which r...
This article example shares the specific code of ...
What you will create In this new tutorial, we'...
Types of joins 1. Inner join: The fields in the t...
1. Command Introduction The watch command execute...
Here are some tips from training institutions and...
Although the frequency of starting the shell is v...
<br />I have always believed that Yahoo'...
Table of contents 1. Define object methods 2. Def...
Preface In the process of managing and maintainin...
Why do we need to optimize SQL? Obviously, when w...
definition Calcite can unify Sql by parsing Sql i...
1. Background As the project's business conti...