Drupal 10: SQL To Create The Drupal Database

Run the following SQL to create the Drupal database.

CREATE DATABASE my_database CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci

It isn't possible to run this through Drush since Drush will attempt to connect to the database, which won't exist.

You will need to either log into the MySQL client and run the command, or pass the command to MySQL like this.

mysql -u user -p -h localhost -e "CREATE DATABASE my_database CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci";

This will prompt you for the database password.

Add new comment

The content of this field is kept private and will not be shown publicly.
5 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.