Difference between revisions of "creating drupal database for install"

From thelinuxwiki
Jump to: navigation, search
(Created page with "drupal version: 8. Create a new database for your site. (Change the username and databasename.) $ mysql -u username -p -e "CREATE DATABASE ''<databasename>'' CHARACTER SET ut...")
 

Latest revision as of 12:45, 4 April 2019

drupal version: 8. Create a new database for your site. (Change the username and databasename.)

$ mysql -u username -p -e "CREATE DATABASE <databasename> CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci";

Log in and set the access database rights:

$ mysql -u username -p

At the MySQL/MariaDB prompt, create the user and set the permissions using the following command (this will create the user and grant privileges):

$ CREATE USER username@localhost IDENTIFIED BY 'password';
$ GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON databasename.* TO 'username'@'localhost' IDENTIFIED BY 'password';