How to export and import a .sql file from command line with options? [duplicate]
Type the following command to import sql data file: $ mysql -u username -p -h localhost DATA-BASE-NAME < data.sql In this example, import ‘data.sql’ file into ‘blog’ database using vivek as username: $ mysql -u vivek -p -h localhost blog < data.sql If you have a dedicated database server, replace localhost hostname with with actual … Read more