Database installation

For the test much alike, skilled use of the database is to test the implementation of the work necessary in the way, so parents who generally as Navicat for MySQL, DataGrip, MySQL Workbench and other direct connection to the database server are using the database connectivity tools, if set up in the machine after the database, you can directly build a database, build tables, so that others can access your database via ip address it (not the Department of Department of ah ha ha little to tall on), then how to build the native MySQL database steps it?

I will experience in actual combat record, left

The steps are: Download the MySQL installation package - installation - configuration environment variable - modify the initial password - manage MySQL database using the connection tool

1, download the MySQL installation package:

Download: https: //dev.mysql.com/downloads/mysql/

Download MySQL Community Server version mysql-5.7.10-osx10.10-x86_64.dmg

 
 

2, MySQL installation

Double-click the installation file to install, the following interface:

 
 

Double-click a form of "mysql-5.7.10-osx10.9-x86_64.pkg" file to begin the installation:

 
 

Click the "Continue" button:

 
 

Click the "Continue" button:

 
 

Click the "Agree" button:

 
 

Here you can click on "customize" button to select the item you want to install, and click "Change Install Location" button to select the MySQL installation path, we can keep the default installation, click "Install" button to start the installation:

 
 

To complete the installation, the system will prompt root temporary initial password is how much you remember to save, if you do not remember, back to reset your password:

 
 

The installation is complete:

 
 

Open the "System Preferences" and found the bottom of the MySQL multi-control button:

 
 

Double-click the control buttons MySQL, MySQL is running:

 
 

Here you can start and stop MySQL database, you can also set whether MySQL data boot, usually check, set the default boot.

3, Configuration

Open a terminal, edit the / ect / profile file, add MYSQL_PATH environment variable, and add the bin directory in your PATH environment variable

Input: sudo vi ~ / .bash_profile Enter

 

 
 

Power-on password, enter

 

 
 

Click on the keyboard "i" enter into the terminal Vim editor, attached at the end face PATH ": / usr / local / mysql / bin"

 

 
 

Press the keyboard "esc" key to exit the editor, press shift + q

 

 
 

Enter "wq" Enter (save and exit), back to the terminal interface

 

 
 

Implementation of source / etc / profile command to make the changes effective immediately.

 

 
 

Continue to log data using the MySQL root user, execute / usr / local / MySQL / bin / mysql -u root -p command to generate the password when installing temporary password

 

 
 

Use mysql command is executed, the system prompts you need to change your password, execute the command statement: set password for 'root' @ 'localhost' = "Your new password"; the following screen appears, change the password, you can successfully landed!

 
 

After modifying the root user password, log out, you can log in again using your new password.

NOTE: If you have forgotten unfortunately temporary password generated during the installation, please refer to: http: //www.jb51.net/article/103044.htm reset the password

4, navicat for mysql MySQL database management

navicat for mysql Download: http://download.csdn.net/download/hacktan/9886898 , after download is complete installation file as follows:

 

 
 

Double-click the installation file to install it:

 

 
 

Installed open navicat, click the "Connect -MySQL" connect to the database, enter a new password for the root user:

 
 

Click the "OK" button to connect, after connection successfully entered the MySQL database management interface:

 

 
 

At this point, you can use a visual management tool for the MySQL database navicat.

5, with navicat New Database

Click on the top left corner of the menu "Connect" button, select MySQL:

 

 
 

Into the connecting interface address configuration, input connection name, host name or IP address (if the unit as a database server, ip or write localhost 127.0.0.1), the user name root, password, code selector utf-8:

 
 

Click on the "connection test" Success click "OK"

 
 

After successfully entering the management interface, you can create a new database connection in a newly built

 

 
 

Database name for themselves, the default character set to select utf8

 
 

Well built database, the following table it can be built

 
 

Implementation of construction of the table statement in the query editor, run

 
 

 

 
 

Refresh the database, you can see a table appear

 

 
 
 
 

So far, over!

NOTE: build MySQL on Windows refer to the following: https://jingyan.baidu.com/article/cd4c2979033a17756f6e6047.html



Author: Top _690d
link: https: //www.jianshu.com/p/50f90041f4c1
Source: Jane books
are copyrighted by the author. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.

Guess you like

Origin www.cnblogs.com/zhifeiji822/p/11936686.html