Skip to content

Instantly share code, notes, and snippets.

@Marinski
Created August 15, 2024 07:42
Show Gist options
  • Save Marinski/7b7bbd28a97218eddd8663378f0916a9 to your computer and use it in GitHub Desktop.
Save Marinski/7b7bbd28a97218eddd8663378f0916a9 to your computer and use it in GitHub Desktop.
Create database and user in mysql
sudo mysql -u root -p
CREATE DATABASE database_name DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON database_name.* TO 'database_user'@'localhost' IDENTIFIED BY 'user_password';
FLUSH PRIVILEGES;
EXIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment