Create database from terminal mysql

MySQL Server -- Posted on Aug. 27, 2019

create database from terminal mysql

              
                DATE=`date +%Y_%m_%d`
mysql -u root -p -e "drop database DATABASE_NAME;create database DATABASE_NAME;"
mysql -u root -p DATABASE_NAME < PATH_TO_MYSQL_DUMP_FILE.sql
                  
   
            

Related Posts