数据库|mysql教程
mysql,表空间
数据库-mysql教程
营销神器 易源码,ubuntu安装类型卡住,局域网+爬虫,php释放,seo中心匹配lzw
创建表空间
网络验证系统源码php,ubuntu禁用内置显卡,tomcat7以上文件上传,以太坊养猫 爬虫,asp可以直接转换成php吗,黄石seo布局lzw
(推荐教学:mysql教学)
彩虹QQ代刷源码,vscode怎么全局查找代码,ubuntu 停掉 x,tomcat9插件,域名信息爬虫,php js跳转页面,綦江区seo整站优化价格,qq业务乐园网站源码,js后台管理系统模板lzw
sql语句:
mysql> create tablespace big_data_in_mysql add datafile first.ibd;Query OK, 0 rows affected (0.57 sec)
上面这个语句就会创建一个名为big_data_in_mysql的表空间。同时这个表空间所对应的数据存放在first.ibd这个文件中。
因为这里没有指定存储目录,所以使用的是默认存储路径。这时,可以到默认数据存储文件夹下查看是否创建成功。
查看表空间
mysql> select * from information_schema.INNODB_SYS_TABLESPACES ;+-------+---------------------------------+------+-------------+------------+-----------+---------------+------------+---------------+-----------+----------------+| SPACE | NAME | FLAG | FILE_FORMAT | ROW_FORMAT | PAGE_SIZE | ZIP_PAGE_SIZE | SPACE_TYPE | FS_BLOCK_SIZE | FILE_SIZE | ALLOCATED_SIZE |+-------+---------------------------------+------+-------------+------------+-----------+---------------+------------+---------------+-----------+----------------+|2 | mysql/plugin | 33 | Barracuda | Dynamic |16384 | 0 | Single| 65536 |98304 |98304 ||3 | mysql/servers | 33 | Barracuda | Dynamic |16384 | 0 | Single| 65536 |98304 |98304 ||4 | mysql/help_topic| 33 | Barracuda | Dynamic |16384 | 0 | Single| 65536 | 9437184 | 9437184 |····| 93 | bas/t_bas_shop_item | 33 | Barracuda | Dynamic |16384 | 0 | Single| 65536 | 163840 | 163840 || 119 | insidemysql/student#p#p2 | 33 | Barracuda | Dynamic |16384 | 0 | Single| 65536 |98304 |98304 || 120 | insidemysql/t | 33 | Barracuda | Dynamic |16384 | 0 | Single| 65536 |98304 |98304 || 122 | test_tablespace | 2048 | Any | Any |16384 | 0 | General | 65536 |65536 |65536 || 125 | big_data_in_mysql| 2048 | Any | Any |16384 | 0 | General | 65536 |65536 |65536 |+-------+---------------------------------+------+-------------+------------+-----------+---------------+------------+---------------+-----------+----------------+53 rows in set (0.03 sec)
删除表空间
DROP TABLESPACE tablespace_name[ENGINE [=] engine_name]
php培训
如果觉得《mysql怎么创建表空间》对你有帮助,请点赞、收藏,并留下你的观点哦!