Mysql- the first to know Mysql

1. What is mysql

     mysql is a relational database, MySQL AB is a Swedish development company, currently part of  Oracle  's products.

2, mysql installation

    Download mysql-installer-community-5.7.12.0.msi

    

3, the metadata: a data dictionary (table system), for storing information of each transaction that it has, as the name, the structure, location, type, data about data that is referred to as metadata.

4, the mysql configuration environment variable, the mysql command can be executed at the command line window

     配置MYSQL_HOME:C:\Program Files\MySQL\MySQL Server 5.7

     Configuration Path: % MYSQL_HOME% \ bin

     Test Login: MySQL -ulfy -p1234 or mysql -hlocalhost -ulfy -p1234 or mysql -h127.0.0.1 -ulfy -p1234

     

5, the user switches

    Currently seemingly found only after the exit of the current user, and then log other users.

    for example:

    Lfy be logged in users: mysql -ulfy -p1234

    

    Then exit, then log mysql user: mysql -umysql -pmysql

    

6, change passwords

    

7, commonly used commands

   1 "show databases: Check how many database currently contains the next instance.

   2 "use the database name: switch databases.

   3 "show tables: View current database table in the database contains.

   4》创建新的数据库

        create database [IF NOT EXISTS] 数据库名;

   5》删除指定数据库

        drop database 数据库名;

   6》查看指定数据库表的表结构(查看表有多少列,每列的数据类型等信息)

        desc 表名;

   7》退出mysql当前用户

        exit+回车

8、什么是事务

 9、sql脚本

 10、mysql数据库支持的两种存储机制:

     1》MyISAM:MySQL早期的默认存储机制,对事务支持不好。

     2》InnoDB:InnoDB提供事务安全的存储机制。InnoDB通过建立行级锁来保证事务的完整性,并以Oracle风格的共享锁来处理Select语句。系统默认启动InnoDB存储机制,如果不想使用InnoDB表,则可以使用skip-innodb选项。

          MySQL-5.0以上版本的数据库,通常无需指定数据表的存储机制,系统默认使用InnoDB存储机制。如果在建表的时候显式指定存储机制,则可以在标准建表语句后面添加以下任意一句:

        1>ENGINE=MyISAM--强制使用MyISAM存储机制。

        2>ENGONE=InnoDB--强制使用InnoDB存储机制。

11、什么是模式?什么是内模式?什么是外模式?

Guess you like

Origin www.cnblogs.com/ZeroMZ/p/11366420.html