All HowTo's MySQL & MariaDB Create a new MySQL user, grant permissions and set the password in one command May 21, 2014 Andrew Galdes 0 This one-liner shows how to create a new MySQL user, grant permissions and set the password: GRANT ALL PRIVILEGES ON mydb.* To 'myuser'@'%' IDENTIFIED BY 'mypassword'; Then run: FLUSH PRIVILEGES And that’s it.