MySQL (win7x64 5.7.16 version) Download, install, configure and use detailed graphics and text tutorials _mysql

Source: Internet
Author: User
Tags character set mysql client

Combined with the information on the Internet, personally to install a MySQL, installed version is win7x64 5.7.16.

The following issues occurred during the installation and resolved:

1. "MySQL Service failed to start service did not report any errors"

2. When starting the MySQL service, prompted "system error 2, the system can not 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/



Because I am not sure whether the official website will change, I put the version of my download at that time a certain degree of cloud link, invalid but still need, please call me big bro.

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. Just unzip it on the line. No installation required. I put it in D-plate.


3. Configuration:

Which is the origin of My.ini file .

The My-default.ini (this file is unzipped, since the tape) this file to copy the renamed My.ini, and then replace the following code can be: (The inside D:\mysql\mysql-5.6.17-winx64 into your own software path, save)
(The following is the contents of the newly created My.ini file.) Remember to modify the path inside. )

[MySQL]
# set MySQL client default character set
Default-character-set=utf8 
[mysqld]
#设置3306端口
port = 3306 
# set MySQL installation directory
basedir=d:\mysql\mysql-5.6.17-winx64
# Set up a directory of MySQL database data
datadir=d:\mysql\mysql-5.6.17-winx64\ Data
# allows maximum number of connections
max_connections=200
# The character set used by the service side defaults to a 8-bit encoded latin1 character Set
Character-set-server=utf8
# The default storage engine to use when creating a new table
Default-storage-engine=innodb

The screenshot of my My.ini file is as follows: (the screenshot above can see where my MySQL is installed, and the following content is consistent.) )

4. Install the MySQL service and start it:

The origin of the Data folder.

When you open the CMD window as an administrator, switch the directory to the bin directory where you extracted the files.

Then enter mysqld install carriage return run on the line

And then it's input net start MySQL start service

Error!!!

"The server was unable to start and the server did not report any errors. ”

And then...

And then entermysqld --initialize-insecure --user=mysql

(After the execution of the above command, MySQL will build a data folder, and set up a default database, login username is root, the password is empty)

Start again: Then enter net start MySQL start service, OK successful.

Just like the way I pictured it.



If unfortunately, you in this step error, it is estimated that our computer system for different reasons, the table of contents of the identification of the gap is not the same, I this is a bar, you give the wrong words to try to change into 2 bars \ \ To see also reported fault.

Please first make sure that your My.ini file inside the 2 directory is indeed correct, the following reply to the third floor of the second reply is estimated that the directory of the configuration file is not written right, just hint that the directory does not exist.

Then refer to the four or five floor of the reply, should be no problem. Successful installation is possible.

Look at the Picture: Error map

This has 2 error, for the first error. Can be resolved as follows N-building method.

The second error-resolution solution.

When starting the MySQL service, prompted "system error 2, the system could not find the specified file."

May be the installation failed, resulting in garbage, the impact of this is to remove first, and then install, and then start again.

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

Below is the English explanation of the official website;

Data file directory should not have other files, this data directory should be an empty directory

Flush data and start MySQL to show MySQL can't start

After emptying, to reinitialize, that is, to install the Build Data folder again.

Best to see what this Data folder is for.

5. Open MySQL database, login MySQL database.

Also, in command mode, switches the directory to its own \ Bin directory.

Input mysql -u root -p , the default is no password. Enter entry, root is user name,

(If you want to do this, you have to open the MySQL service.) Otherwise, it won't work. )

Exit the exit carriage return, and it's OK. Remember to directly close the CMD window is not exited, to enter exit will not exit AH


In addition: 1. Manually open the MySQL service method, as shown in the figure:

Specific 2. The Task Manager opens the service in the following ways:

Configure an environment variable, the command line to open the MySQL database is more concise.

Here's what I've configured in my PATH environment variable, obviously, to see that my last one didn't end with a semicolon.

When you want to add this MySQL environment variable to this time, the preceding semicolon has to be filled. And then add it again.

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 configuring the environment variables, you can directly cmd, do not enter the directory, and then enter Mysql-u root-p, you open the MySQL database, of course, your service must start first, or not.

The environment is good now, but I don't know how to write a statement. Oh, it's embarrassing.

The above is my record of the configuration of the environment.

Reference to some degree of experience, plus your own practice. Leave this record for later use.

Sketch of a statement that is simple to use:


(This diagram is special because I am in the IntelliJ Idea editor of the terminate editor with the terminal inside the use of the command line, like you cmd is the same as the side of the editor is still a bit of a cow x, what all have. )

There are questions, direct message plug, DMS Everyone can not see it. Leave a message, you can give more people to solve the problem, you say is not.

The following figures I have updated are:

View the version.

This is someone asked to see the version of the answer to the error. And then see this picture above I am the command line to successfully log on to the MySQL database, and then quit again. The specific reference above, why so simple to log in directly.

Modify Password:

Modify MySQL root password format: mysqladmin -u user name-p old password password new password, example look inside the picture.

-p after no space, directly with the old password, otherwise it will be an error. Just look at the screenshot.

After installing MySQL, I see an overview of the databases on my computer, and I use visual tools to see.

The above is a small series to introduce the MySQL (win7x64 5.7.16 version) Download, installation, configuration and use of detailed graphics and text tutorials, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!

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.