Will & Skill Developers

Will & Skill Developers


Thoughts, snippets and ideas from the team at Will & Skill AB, Stockholm.

Faisal Mahmud
Author

“The mind is not a vessel to be filled, but a fire to be kindled.” ― Plutarch

Share


Create and grant access to a MySQL database

Faisal MahmudFaisal Mahmud

Simply create a new database from scratch and give full access to that user on the newly created database.

Create the database

$ mysql -u root -p
$ mysql > create database example_com;

Granting database access to user

grant all privileges on database.* to database_user@localhost identified by 'password';
flush privileges;

with the example stated above it could be something like this

grant all privileges on example_com.* to example_user@localhost identified by 'secret';
flush privileges;
Faisal Mahmud
Author

Faisal Mahmud

“The mind is not a vessel to be filled, but a fire to be kindled.” ― Plutarch

Comments