How to create a new user in mysql with all privileges

  1. mysql -u username -p then press enter
  2. type password
  3. CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’;
  4. GRANT ALL PRIVILEGES ON * . * TO ‘newuser’@’localhost’;
  5. FLUSH PRIVILEGES;

Leave a Reply

Your email address will not be published. Required fields are marked *