thiagobraga
9/15/2014 - 5:19 PM

Automatic creation of databases with MySQL command line

Automatic creation of databases with MySQL command line

To-do

  • Make this script with PHP and CodeIgniter to avoid user password in command line.
mysql -uroot -p"YOUR_PASSWORD" -e "source /path/to/schema.sql" -v -v -v -t --default-character-set=utf8
mysql -uroot -p"YOUR_PASSWORD" -e "source /path/to/core.sql" -v -v -v -t --default-character-set=utf8
mysql -uroot -p"YOUR_PASSWORD" -e "source /path/to/data.sql" -v -v -v -t --default-character-set=utf8