Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!
DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5886 posts at DZone. View Full User Profile

Creating A MySQL Database And Adding A User From CLI

04.18.2005
Email
Views: 4779
  • submit to reddit
        
mysql -uroot -p
mysql> CREATE DATABASE staff_hieraki;
mysql> GRANT ALL PRIVILEGES ON staff_hieraki.* TO staff@localhost IDENTIFIED BY 'password-goes-here' WITH GRANT OPTION;