To run a sql script file from MySQL command prompt: Change to the directory in which the script file is located in your file system.Run MySQL command prompt
mysql -u username -p.
Go to the database in which you want the script file to be run with this command: use , it supposes that you already have a database created in your server, I used a database called 'budget'.
Then use the SOURCE command as this:
SOURCE scriptname.sql;
1 comment:
Thank you for writing this, I was wondering how do it.
Post a Comment