I have a database in different server now I have to export table schema and also have to download it in my local .
If possible, please let me know the command for exporting table with data also.
You can use --no-data option with mysqldump see
mysqldump -u root -p --no-data dbname > schema.sql For backup use : mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql For restore use : mysql -u root -p[root_password] [database_name] < dumpfilename.sql
mysqldump -u root -p --no-data dbname > schema.sql
For backup use : mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
For restore use : mysql -u root -p[root_password] [database_name] < dumpfilename.sql
Now you can do scp to your local like this :
scp [email protected]:/home/user/schema.sql . (If using windows so please execute these commands on putty.)
I hope it helped you!