没有数据的 MySql 导出模式 [英] MySql export schema without data

查看:26
本文介绍了没有数据的 MySql 导出模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用带有 Java 程序的 MySql 数据库,现在我想将该程序提供给其他人.

I'm using a MySql database with a Java program, now I want to give the program to somebody else.

如何导出MySql数据库结构,里面没有数据,只有结构?

How to export the MySql database structure without the data in it, just the structure?

推荐答案

你可以用 --no-data 选项和 mysqldump 命令来做

You can do with the --no-data option with mysqldump command

mysqldump -h yourhostnameorIP -u root -p --no-data dbname > schema.sql

这篇关于没有数据的 MySql 导出模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆