nRnYqfrb5pJuTP5YAohj

MqSQL Database and User setup script

Jan 15th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.48 KB | None | 0 0
  1. DROP DATABASE my_website;
  2. CREATE DATABASE my_website;
  3. USE my_website;
  4. DROP USER 'my_website_user'@'localhost';
  5. DROP USER 'my_website_user'@'%';
  6. CREATE USER 'my_website_user'@'localhost' IDENTIFIED BY 'muh_russian_haxxors';
  7. CREATE USER 'my_website_user'@'%' IDENTIFIED BY 'muh_russian_haxxors';
  8. GRANT ALL ON my_website.* TO 'my_website_user'@'localhost';
  9. GRANT ALL ON my_website.* TO 'my_website_user'@'%';
  10. FLUSH PRIVILEGES;
  11. SELECT * FROM mysql.user WHERE User='my_website_user';
Advertisement
Add Comment
Please, Sign In to add comment