February 8 A new book-->mysql must be known. As a result, when you install MySQL, you are constantly encountering a "service does not start, no problem reported", or a classic 10061 issue that occurs when you enter MySQL. The bedroom was not ready for a whole afternoon. After that, reflect on ... Summarizing online friends ' blogs, locating my problem is when generating the data file, because, every time I execute a command, the Data folder 3 folders (Mysql,sys,performance_schema) never appeared. So, my problem must be when initializing the data file (of course, you can copy the MySQL data file installed successfully, but this method after the problem, please refer to other blog post)
As I refer to the blog, this method is applicable to the 5.7 version, 5.6 has not tried.
I'm installing mysql-5.7.17-winx64.
Original address: http://www.cnblogs.com/c3gen/p/6168765.html
On the MySQL website, do not understand can use Google or Firefox or 360 browser to translate into Chinese look, here no more say, directly say configuration problems.
Download after the decompression (unzip the address below the unified press "install Address" said):
1) need to configure environment variables, specifically in My Computer--Properties--advanced--environment variables--System variables
There are a lot of things to say first: Create a new mysql_home system variable, specifically: Mysql_home = your MYSQL installation address
Then add%mysql_home%\bin under Path (note that the semicolon ends, added at the very beginning, or added at the end.) To add in the middle, be sure to add it after the original semicolon (;), and end with a semicolon)
First say the name, in fact, it doesn't matter, mainly to let others know what this is, so the name can say any developer can understand what this means (conventional).
And then add the path under the variable is because you create a new mysql_home system variables, so add the time is so written%mysql_home%\bin;
Of course, you can also completely ignore what mysql_home, directly in path add: MySQL installation address \ Bin
For example, my installation address is C:\MySQL.
Then I can configure it as: C:\MySQL\bin; (because I was added at the beginning of the position, so the semicolon ends)
2) Create a My.ini file
# installation directory
Basedir = C:\MySQL
# Data Storage Directory
DataDir = C:\MySQL\data
What you need to explain here is that the data folder under the installation address is an empty folder that you need to create yourself.
3) Open the CMD window as an administrator and switch the directory to the bin directory where you installed the address
Executive Mysqld-install
-----key------
Continue to implement MYSQLD--initialize-insecure-user=mysql;
Note the command format, which must be done, if not, then you will get this error:
Must be executed mysqld--initialize-insecure-user=mysql; Not too much, no less.
At this time, you can see your data folder as long as there are (Mysql,sys,performance_schema) three folders, and a number of white paper, then congratulations, you succeeded.
4) next start MySQL service: net start MySQL
5) Enter Mysql:mysql-uroot-p
At this time, if your data folder is copied, then please enter your original MySQL password, if not correct, please refer to other blog posts.
If it is installed for the first time and is configured in accordance with this article, then direct enter into the MYSQL,MYSQL installation default no password.
6) Change root password
First to switch the database MySQL
Use MySQL
Execute set password=password= (' root ') and set the password. and flush permissions flush privileges;
The change password here is not the same as 5.6 because the user table of 5.7 does not password this column. You can use the DESC user to view the data structure of the user table.
\q quit MySQL to log back in to MySQL.
At this point, success.
In fact, in the beginning did not find the three folder problem, 8th did not get out of the afternoon, I suspect that the computer environment has a problem (the company's computer win7). 6 o'clock after work, I was 5 o ' clock 40 more anxious to go, go back to my new bought notebook (WIN10).
WIN10 system, on the Internet and looked at half a day, suddenly found that my Data folder has been less than three folders (Mysql,sys,performance_schema), and then check the role of these folders, know that MySQL and Sys is a very important file, MySQL is to change the password when used, Sys seems to be logged in time to use, this is not very clear, a later study. The main feeling is to find the right direction, on the rush to locate how to generate these three folders.
Then he found the mysqld--initialize-insecure-user=mysql;
I see that the it is executed mysqld--initialize-insecure--user=mysql;
I was wondering if this is the problem with the statement, resulting in incomplete file generation. The result is a try, special. It turns out you are. Horizontal slots. I........................
Heart 10,000 grass mud horse ran over, do not mention.
Today to the company computer execution, a success. Sorting out, hope to help everyone, welcome to reprint, also welcome collection.
About MySQL5.7.17 Installation-free configuration issues. (Win10 also)