Introduction to mysql database

(1) Problems solved by the database system: persistent storage, optimized reading and writing, and ensuring the validity of the data
(2) The databases currently in use are mainly divided into two categories:
documentation: such as sqlite, which is a file, which is copied through the file Complete database replication-equivalent to a file
service type: such as mysql, postgre, data is stored in a physical file, but you need to use the terminal to connect with tcp / ip protocol to read and write the database. In general, there are two End: server side, client database is stored on the server side, through the client to connect to the server to achieve the operation of the database

(3) design of the database:
ER model:
-------- (1) of the current physical databases are designed according to the model ER, E represents entry, (entity), R represents relationship, showing the relationship
- ------ (2) An entity is converted into a table in the database
-------- (3) The relationship describes the correspondence rules between two entities, including
one
-to
- one one -to - many many - to -many
The relationship is converted to a column in the database table * A row is an object in a relational database

Three normal form: the
first normal form: the column is not splittable, which means that the data of each column in the database table cannot be split. The
second normal form: the unique identifier, the attribute of each column is unique, and cannot be repeated. The
third normal form: the reference primary key, id

(4) The operation of the database mainly includes:
the operation of the database : the operation of creating and deleting the
tables in the database: the operation of the data in the database: creating, modifying, deleting and other
operations: adding, modifying, deleting, querying and other operations ---- (this Is the core knowledge of learning database)

(5) Installation and configuration of the database:
Operate under the ubuntu system of the virtual machine-
(1) Installation: This step can refer to this link (very concise and useful) https://www.cnblogs.com/APeng2019/p/10719341. html-
(2) Start the service and other operations are reflected in the above

– (3) Configuration: Allow remote connection. For the configuration of this step, please refer to (the mysql of navicate connection server is explained in detail). Here you need to set the username and password: https://blog.csdn.net/weixin_41960119/article / details / 89605822

找到mysql配置文件并修改sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
将bind-address=127.0.0.1注释
登录mysql,运行命令grant all privileges on *.* to '**root**'@'%' identified by '**mysql**' with grant option;
flush privileges;
重启mysql
这里面的**root**和**mysql**是连接数据库的用户名和密码
Published 129 original articles · Like 43 · Visits 100,000+

Guess you like

Origin blog.csdn.net/nbxuwentao/article/details/104413406