数据库简单操作
来源:互联网 发布:淘宝千万不能搜索的 编辑:程序博客网 时间:2024/06/05 19:32
mysql数据库简单操作
查看当前所有数据库
mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || jdbc || mysql || performance_schema || test |+--------------------+5 rows in set (0.00 sec)
创建数据库test_db
mysql> create database test_db;Query OK, 1 row affected (0.01 sec)mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || jdbc || mysql || performance_schema || test || test_db |+--------------------+6 rows in set (0.00 sec)
查看已创建数据库test_db的定义
mysql> show create database test_db\G;*************************** 1. row *************************** Database: test_dbCreate Database: CREATE DATABASE `test_db` /*!40100 DEFAULT CHARACTER SET latin1 */1 row in set (0.00 sec)ERROR:No query specified
删除数据库test_db
mysql> drop database test_db;Query OK, 0 rows affected (0.00 sec)mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || jdbc || mysql || performance_schema || test |+--------------------+5 rows in set (0.00 sec)
存储引擎
mysql> show engines \G;*************************** 1. row *************************** Engine: FEDERATED Support: NO Comment: Federated MySQL storage engineTransactions: NULL XA: NULL Savepoints: NULL*************************** 2. row *************************** Engine: MRG_MYISAM Support: YES Comment: Collection of identical MyISAM tablesTransactions: NO XA: NO Savepoints: NO*************************** 3. row *************************** Engine: MyISAM Support: YES Comment: MyISAM storage engineTransactions: NO XA: NO Savepoints: NO*************************** 4. row *************************** Engine: BLACKHOLE Support: YES Comment: /dev/null storage engine (anything you write to it disappears)Transactions: NO XA: NOSavepoints: NO*************************** 5. row *************************** Engine: CSV Support: YES Comment: CSV storage engineTransactions: NO XA: NO Savepoints: NO*************************** 6. row *************************** Engine: MEMORY Support: YES Comment: Hash based, stored in memory, useful for temporary tablesTransactions: NO XA: NOSavepoints: NO*************************** 7. row *************************** Engine: ARCHIVE Support: YES Comment: Archive storage engineTransactions: NO XA: NOSavepoints: NO*************************** 8. row *************************** Engine: InnoDB Support: DEFAULT Comment: Supports transactions, row-level locking, and foreign keysTransactions: YES XA: YES Savepoints: YES*************************** 9. row *************************** Engine: PERFORMANCE_SCHEMA Support: YES Comment: Performance SchemaTransactions: NO XA: NOSavepoints: NO9 rows in set (0.03 sec)ERROR:No query specified
Support列的值表示某种引擎是否能使用:YES表示可以使用,NO表示不能使用,DEFAULT表示该引擎为当前默认引擎。
阅读全文
0 0
- 简单的数据库操作:
- Mysql数据库简单操作
- 简单Hibernate数据库操作
- 简单数据库操作类
- 简单的数据库操作
- Symbian数据库简单操作
- 简单数据库操作
- 简单数据库操作
- 数据库操作简单示例
- 简单的数据库操作
- 简单数据库操作 DBOper
- ios 数据库简单操作
- 数据库简单操作
- sqlite数据库简单操作
- db2 简单数据库操作
- c#数据库简单操作
- FMDB 数据库简单操作
- 数据库简单操作
- F
- Codeforces Round #426 (Div. 2) B.The Festive Evening+C.The Meaningless Game
- Java实现网络爬虫入门Demo
- 织梦入门arclist
- Windows下安装ZooKeeper
- 数据库简单操作
- Red Hat Enterprise Linux 换yum源问题
- 二叉树的四种遍历方法(递归、迭代)
- vue组件学习
- CSU1565-Word Cloud
- Unite 2017 干货整理 优化篇
- Java自定义注解
- firefox中的event.clientX问题
- mysql计算年龄