mamp - Empty MySQL database and import from bash script? -


im trying empty database , import bash script. im using mysql mamp pro. following logs me mysql doenst run of operations.

/applications/mamp/library/bin/mysql -u root -p  drop database database_name; create database database_namem; database_name < /file-to-import.sql; 

i think you're suppose execute query string this:

/applications/mamp/library/bin/mysql -u root -pyourpassword -e "drop database database_name;" 

it might possible execute multiple queries way separating ; have not tried.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -