Create a database via MySQL console Leave a comment

Login to MySQL console in terminal use:

mysql -u=root -p

Create a database:

Create Database DATABASENAME Character Set utf8mb4 Collate utf8mb4_unicode_ci;

Define a user for the database:

Grant All Privileges ON DATABASENAME.* to 'USER_NAME'@'localhost' Identified By 'YOUR_PASSWORD';

Refresh the permissions:

Flush Privileges;

Leave a Reply

Your email address will not be published. Required fields are marked *