Create a MySQL User and Grant Access to a Database
Create a MySQL User and Grant Access to a Database#
Login:
mysql -u root -p
Create a user:
CREATE USER 'user'@'%' IDENTIFIED BY 'password'
Grant the user access:
GRANT ALL PRIVILEGES ON database.* TO 'user'@'%';