Java EE Development Environment Construction (2)---(MySQL installation)

Source: Internet
Author: User

Last written the Java EE Development environment to build the JDK installation ... Then I look at the time I feel sometimes loading pictures is not very smooth, so this time to add a little more pictures ~ ~

Java EE development environment build MySQL installation 1:mysql download

Search MySQL in Baidu to enter the official website (http://www.mysql.com/)

Then add the following URL--"downloads/mysql

Then the page will jump to the MySQL download page (http://dev.mysql.com/downloads/mysql/) (you directly copy here also can ~ ~ Front just tell you how to find the place to download ~ ~)

Mainly look at the above red box parts: where you can choose your system type, and can download the source code ~ ~

Afraid of the picture does not appear, or write: Select platform below the dropdown box, choose the system type ~ ~

Then choose the file you want to download ~ ~ My is win764 bit ~ ~ So the choice is Windows (x86,64-bit), ZIP archive~~ Click download~~ jump Page ~ ~

Then ~ ~ If you have an Oracle account, click Login without registering an account with sign up and then log in.

After logging in, you will skip to the download screen and click Download Now to download the files you have selected so far ~ ~

Then ~ ~ Download Success ~ ~

Installation configuration for 2:mysql

Unzip the downloaded zip file to the location you want to place

I still put it in the D:\develop.

My MySQL path is: D:\develop\mysql-5.7.12-winx64

Open the MySQL folder, create a new data folder in the folder (if you downloaded an older version of SQL may already have the Data folder, you do not have to be created)

Then right-click to open the My-default file and make changes to the contents of the file

What to modify:

# basedir = D:\develop\mysql-5.7.12-winx64 --"MySQL file path
# DataDir = D:\develop\mysql-5.7.12-winx64\data --"MySQL Data file path
# port = 3306 --"port number

Then save, change the file name to My.ini (note: see if the filename suffix of your folder/file is hidden ...)

Open cmd as an administrator

Find the location of your MySQL

--------------------------------------------------------------------------------

c:\windows\system32>D:

d:\>CD D:\develop\mysql-5.7.12-winx64\bin

--------------------------------------------------------------------------------

Input command:mysqld--initialize--user=mysql--console return ~ ~

Then you have the content in the Data folder ~ ~ will also generate a random password ~ ~

A temporary password is generated for [email protected] localhost: x?&ji.il4sll

--------------------------------------- -----------------------------------------

d:\develop\mysql-5.7.12-winx64\bin>mysqld--initialize-- User=mysql--console
2016-05-22t04:08:35.038482z 0 [Warning] TIMESTAMP with implicit DEFAULT value is
deprecated. --explicit_defaults_for_timestamp server Option (see Doc
umentation for more details).
2016-05-22t04:08:35.038482z 0 [Warning] ' no_zero_date ', ' no_zero_in_date ' and ' E
rror_for_division_by_zero ' SQL modes should is used with strict mode. They would
be merged with strict mode in a future release.
2016-05-22t04:08:35.038482z 0 [Warning] ' no_auto_create_user ' SQL mode is not s
et.
2016-05-22t04:08:36.692576z 0 [Warning] innodb:new log files created, lsn=45790

2016-05-22t04:08:37.078598z 0 [Warning] innodb:creating FOREIGN KEY constraint
system tables.
2016-05-22t04:08:37.146602z 0 [Warning] No existing UUID have been found, so we a
Ssume that's the first time that this server has been started. Generating
A new uuid:dbbb85d0-1fd2-11e6-8ae2-4c809368d1e7.
2016-05-22t04:08:37.152603z 0 [Warning] Gtid table is not a ready-to-be used. Tabl
E ' mysql.gtid_executed ' cannot be opened.
2016-05-22t04:08:37.175604z 1 [Note] A temporary password is generated for [email protected]
localhost: x?&ji.il4sll

D:\develop\mysql-5.7.12-winx64\bin>

--------------------------------------------------------------------------------

This password must be remembered, immediately to use ~ ~

Enter command to install MySQL-"mysqld Install" (Note: mysqld is not MySQL)

Then enter the command to start MySQL-" net start MySQL "

Prompt service has started successfully ~ ~

Then enter the command, log in to MySQL--" mysql-u root-p

It will prompt you to enter the password-"Enter password:

The password is the password that you remember above ~ ~

Tip: In the cmd command, the CTRL + V Paste command cannot be used ~ ~ So, want to paste ~ ~ can only right click, choose Paste ~ ~

After entering the password, click enter ~ ~

Congratulations on your successful entry into MySQL.

If you are prompted with a wrong password, you may have previously installed MySQL, or you have entered the wrong password ... Please check carefully, or enter the previous old password ~ ~

After successfully entering MySQL, first change the login password, change it to a you remember to live ~ ~ Lest forget ...

Input command:Set password = password (' 123456 '); --"123456 is the password I want ~ ~ must be followed by a semicolon ... End of the rep ~

Then you will be prompted: Query ok,0 rows affected,1 warning <0.00 sec>

Indicates that your password has been modified successfully ~ ~

To experiment with it ~ ~

Enter exit exit mysql~

Re-enter mysql-u root-p

Enter the changed password ~ ~ successfully entered the mysql~ password modification Success ~ ~

Oh yeah!! ~ ~ Basically here, MySQL is already installed ~ ~

But don't you think it's a hassle to go into MySQL's folder every time?

So ~ ~ We are going to configure MySQL to the environment variable ~ ~

Right: My Computer (computer)--"Properties--" Advanced system settings--"Environment variables--" System variables Find path--"click Edit

In front of the variable value, add the path of your MySQL bin folder + ";" ~ ~

Mine is:D:\develop\mysql-5.7.12-winx64\bin;

Then reopen the Doc window

Direct input mysql-u root-p

What do you think? You can enter the password directly and then go to MySQL.

If the prompt cannot find the command ~ ~ that must be when you write the bin path is wrong ~ ~ ~ Look for it ~ ~

To this ~~mysql installation is all over ~ ~ can be used slightly ~ ~

Java EE Development Environment Construction (2)---(MySQL installation)

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.