copy mysql database structure only

MySql export schema without data

  1. Login to DB server
  2. Run the below command to take backup of schema of database without data.

# mysqldump -u root –p  -d olddb > backup.sql

OR

# mysqldump -u root -p –no-data dbname > schema.sql

 

 

Related Posts

  • 52
    What is database? Database is an organized collection of information about an entity having controlled redundancy and serves multiple applications. DBMS (database management system) is an application software that is developed to create and manipulate the data in database. A query language can easily access a data in a database.…
    Tags: database, data, server, mysql, db
  • 46
    To learn more about what is binary log and how to setup Click here MySQL binary log : mysqlbinlog utility mysqldump – MySQL Database Backup and restore program Purge Binary log MySQL Master-Master-Slave-Slave Replication Database Recover from MySQL binary log: Binary logs store all the queries (in STATEMENT format) or…
    Tags: database, mysql, command, data, db
  • 41
    For this process We should noted that there must have the same architecture on both machines. I.e. if we have 32 bit on one server then other server would also have 32 bit. But in case if we have 32 bit on one server and 64-bit on another then we will have to…
    Tags: mysql, database, server, copy
  • 39
    What is mysqldump The mysqldump client is a utility that performs logical backups, producing a set of SQL statements that can be run to reproduce the original schema objects, table data, or both. It dumps one or more MySQL database for backup or transfer to another SQL server. The mysqldump command can also generate output…
    Tags: server, mysqldump, mysql, data, database, backup
  • 33
    The LOAD DATA statement can load a file that is located on the server host, or it can load a file that is located on the client host when the LOCAL keyword is specified. There are two potential security issues with supporting the LOCAL version of LOAD DATA statements: The…
    Tags: server, data, mysql, database

Satya Prakash

VOIP Expert: More than 8 years of experience in Asterisk Development and Call Center operation Management. Unique Combination of Skill Set as IT, Analytics and operation management.

One thought on “copy mysql database structure only

  • March 26, 2016 at 1:47 pm
    Permalink

    mysqldump -u root -p dbname -d > schema.sql

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: