Yes, you can do that by using --no-data option with mysqldump command-line tool of MYSQL
To get the schema, a mysqldump command is used:
A mysqldump command-line tool of MYSQL is used to create dumps (or backup copies) of databases including the schema or structure and the data itself as well. Many command-line flags are there which are used to get the structure or the data instead of everything.
With the help of no data, you can dump the database structure for all the tables in this way
mysqldump -u root -p --no-data databasebname > schema.sql
Here, the -u flag indicates the username, whereas the -p flag is used for the password that will be supplied. Once, you press the <enter> tab you will be prompted for the password.
Alternatively, the password can also be supplied on the command line, but there should not be any spaces between the -p flag and the password.