After installing the database, we need to understand some of its basic concepts, as described earlier: The database is made up of a number of associated tables. Then include rows, columns, primary keys, foreign keys, indexes, and so on in this table.
Database: A collection of tables that have associations.
Data table: A table is a matrix of data, and a table in a library can be viewed as a spreadsheet.
Column: A column contains data of the same nature, such as age, phone number.
Line: A set of related data, also known as a data record.
Primary key: The primary key is unique, and only one primary key can be included in a data table. You can use a primary key to query the data.
FOREIGN key: Mainly used to correlate two tables.
Index: Use an index to quickly query records in a data table, similar to a book's directory.
How to connect the MySQL database:
Windows:
1 Go to official website download mysql version of Windows is usually an executable file ending with an. msi; (You can also install a MySQL client, depending on your personal habits)
2 after the installation is complete, you need to modify the environment variables for the Windows system: see:
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/8B/62/wKiom1hLlSWxInUCAAIGzfkN2zE342.jpg-wh_500x0-wm_3 -wmp_4-s_1524750397.jpg "title=" 2016-12-10_133421.jpg "alt=" Wkiom1hllswxinucaaigzfkn2ze342.jpg-wh_50 "/>
3 Open the 3306 port on the MySQL server:
Iptables-i INPUT 1-d 192.168.159.137-p tcp--dport 3306-j ACCEPT (IP is my virtual machine address)
4 Open the Windows system cmd command prompt: Enter the following command:
Mysql-u User name-H 192.168.159.137-p
When you enter, you will be prompted for your password:
Linux:
With the 4th step above, if there is no password, enter MySQL directly.
This article from "10,000 years too long, seize" blog, please be sure to keep this source http://zengwj1949.blog.51cto.com/10747365/1881458
MySQL database three: Database Terminology and Client login