Command line instructions to create a database in MySQL


/ Published in: SQL
Save to your folder(s)

$ mysql -u ''adminusername'' -p


Copy this code and paste it in your HTML
  1. mysql> CREATE DATABASE ''databasename'';
  2.  
  3. mysql> GRANT ALL PRIVILEGES ON ''databasename''.* TO "''username''"@"''hostname''" IDENTIFIED BY "''password''";
  4.  
  5. mysql> FLUSH PRIVILEGES;
  6.  
  7. mysql> EXIT

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.