码迷,mamicode.com
首页 > 其他好文 > 详细

第一章 基本操作

时间:2016-05-24 22:16:10      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:

创建数据库

 

mysql> create database example;

Query OK, 1 row affected

   

   

查看已存在的数据库

mysql> show databases;

+--------------------+

| Database |

+--------------------+

| information_schema |

| MyCloudDB |

| example |

| mydatabase |

| mysql |

| performance_schema |

| sampledb |

| user_db |

+--------------------+

8 rows in set

   

   

   

删除数据库

   

mysql> drop database example;

Query OK, 0 rows affected

   

   

   

数据库存储引擎

 

查看支持的存储引擎

mysql> show engines;

+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+

| Engine | Support | Comment | Transactions | XA | Savepoints |

+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+

| MyISAM | YES | MyISAM storage engine | NO | NO | NO |

| CSV | YES | CSV storage engine | NO | NO | NO |

| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |

| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |

| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |

| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |

| ARCHIVE | YES | Archive storage engine | NO | NO | NO |

| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |

| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |

+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+

9 rows in set

   

查看默认存储引擎

mysql> show variables like ‘storage_engine‘;

+----------------+--------+

| Variable_name | Value |

+----------------+--------+

| storage_engine | InnoDB |

+----------------+--------+

1 row in set

  

第一章 基本操作

标签:

原文地址:http://www.cnblogs.com/wuchaodzxx/p/5524763.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!