For MySQL (win7x64 5.7.16), download, install, configure, and use detailed graphic tutorials, win7x645.7.16

Source: Internet
Author: User

For MySQL (win7x64 5.7.16), download, install, configure, and use detailed graphic tutorials, win7x645.7.16

Based on the information on the Internet, I personally installed MySQL. The installation version is win7x64 5.7.16.

The following problems occur during installation:

1. "MySQL service cannot start the service and no error is reported"

2. When starting the MySQL service, the system prompts "System Error 2, the system cannot find the specified file ".

3. TIMESTAMP with implicit DEFAULT value is deprecated. Please use -- explicit_d...

4. initialize specified but the data directory has files in it

1. Download:

Address: http://dev.mysql.com/downloads/mysql/



I am not sure whether the official website will change. I put the link to the cloud disk of the version I downloaded at that time. If it is invalid but still necessary, please call my master.

Link: http://pan.baidu.com/s/1dFoPxTJ password: wd4o.

Mysql-5.7.16-winx64 installation package

2. installation:

The ZIP Archive version is free of installation. You just need to decompress the package. No installation is required. I put it on drive D.


3. Configuration:

That isThe origin of my. ini file.

Copy the my-default.ini (this file is decompressed and comes with it) and rename my. ini, and then replace it with the following code: (Change D: \ mysql \ mysql-5.6.17-winx64 to your own software path, save)
(The following content is the content of the newly created my. ini file. Remember to modify the path .)

[Mysql] # set the default character set of the mysql client default-character-set = utf8 [mysqld] # set port 3306 to port 3306 # set the mysql installation directory basedir = D: \ mysql \ mysql-5.6.17-winx64 # Set the mysql database data storage directory datadir = D: \ mysql \ mysql-5.6.17-winx64 \ data # maximum number of connections allowed max_connections = 200 # the character set used by the server defaults to the 8-bit latin1 character set character-set-server = utf8 # default storage engine default-storage-engine = INNODB

My. ini file is as follows: (the specific directory above shows where my MySQL is installed, which is consistent with the following content .)

4. Install and start the mysql service:

That is, the origin of the data folder.

Open the cmd window as an administrator and switch the directory to the bin directory of the decompressed file.

Enter mysqld install and press enter to run the command.

Then, enter net start mysql to start the service.

Error !!!

"The server cannot be started and no error is reported ."

Then...

Entermysqld --initialize-insecure --user=mysql

(After executing the preceding command, MySQL creates a data folder and creates a default database. The logon username is root and the password is blank)

Start again: Enter net start mysql to start the service. OK is successful.

As shown in my figure.



If, unfortunately, you have an error in this step, it is estimated that our computer system is different, and the identification of the directory delimiter is different. I am a \ bar, if you report an error, change it to two bars \ To see if the error is returned.

Please first confirm your my. the two directories in the INI file are indeed correct. The second reply to the third floor below is estimated to be that the directory of the configuration file is not correctly written, so the system prompts that the directory does not exist.

Then, let's see the reply on the fourth floor. It can be successfully installed.

Figure: Error chart

There are two errors. The first error is returned. You can solve the problem as follows.

The second error solution.

When starting the MySQL service, the system prompts "System Error 2, the system cannot find the specified file ".

This may be caused by installation failure, which may cause spam and impact. In this case, delete the file, install the file, and start it again.

Error: initialize specified but the data directory has files in it

The following is an English explanation on the official website;

The data file directory should not contain other files. The data directory should be an empty directory.

After data is cleared, start mysql. mysql cannot be started.

After the data is cleared, you need to reinitialize it, that is, re-install and generate the data folder.

It's best to see what the data folder is doing.

5. Open the MySQL database to log on to the MySQL database.

In command mode, switch the directory to your \ bin directory.

Inputmysql -u root -pBy default, there is no password. Press enter to enter. root is the user name,

(To do this, you must have enabled the MySQL service. Otherwise, it won't work .)

Exit and press Enter. Remember that closing the cmd window does not exit. You need to enter exit to exit.


In addition: 1. To manually open the MySQL service,

2. The task manager opens the Service as follows:

Configure environment variables and open the mysql database through the command line.

The following is what is configured in my Path environment variable. Obviously, my last one is not ended with a semicolon.

When you want to add the MySQL environment variable to this, you must add the semicolon in front. And then add.

C: \ ProgramData \ Oracle \ Java \ javapath; C: \ Program Files (x86) \ NVIDIA Corporation \ PhysX \ Common; % SystemRoot % \ system32; % SystemRoot %; % SystemRoot % \ System32 \ Wbem; % SYSTEMROOT % \ System32 \ WindowsPowerShell \ v1.0 \; % JAVA_HOME % \ bin; % JAVA_HOME % \ jre \ bin; C: \ Android-sdk-windows \ tools; C: \ Program Files \ TortoiseSVN \ bin; % MAVEN_HOME % \ bin; % M2_HOME % \ bin; D: \ Program Files \ nodejs \

After the environment variables are configured, you can directly run cmd without entering the directory, and then enter mysql-u root-p to open the MySQL database. Of course, your service must be started first, otherwise, it will not work.

Now the environment is good, but I don't know how to write statements. Oh, sorry.

The above is my configuration environment record.

A certain degree of experience, coupled with your own practices. Leave this record for future use.

A simple statement:


(This figure is special because the command line I used in the terminal that comes with the terminate editor in the intellij idea editor is similar to your cmd. It can be seen from the side that this editor is still a bit cool, everything .)

If you have any questions, you can leave a message directly, but you can't see the private information. If you leave a message, you can solve the problem for more people.

I subsequently updated the following figures:

View the version.

This is the answer to the version error. As shown in the figure above, I successfully logged on to the MySQL database through the command line and then exited. For more information, see the preceding section.

Change Password:

Modify the MySQL root User Password format:mysqladmin -uUsername-p old password new password, as shown in the figure below.

-P is followed by an old password without spaces. Otherwise, an error is reported. For more information, see.

After installing MySQL, I can see the overview of the database on my computer. I am using a visual tool.

The above is a detailed graphic tutorial on MySQL (win7x64 5.7.16) download, installation, configuration, and use. I hope it will help you, if you have any questions, please leave a message and the editor will reply to you in time. Thank you very much for your support for the help House website!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.