Reputation: 957
I have the next file: create_mysql.sql
DROP DATABASE IF EXISTS playence_media; CREATE DATABASE playence_media; USE playence_media;
GRANT ALL PRIVILEGES ON . TO 'media'@'localhost' IDENTIFIED BY 'media' WITH GRANT OPTION;
But I don't know how to create this database. I would like to do it with my terminal, no other graphics interfaces. Thanks
Upvotes: 1
Views: 13579
Reputation: 4521
Using MySQL's command line client:
mysql -h <host> -u <username> -p < create_mysql.sql
You can ommit the -h <host>
part if the server runs on your localhost.
Upvotes: 5