How to create Mysql users
Aug 13, 2021
Because who wants to go through 1000+ words SEO optimized articles in Digital Ocean everytime? We all know what we want, two lines of code to copy paste. Hence my new website: https://howtocreateusermysql.com/
It gives you, by default:
- Strong password
- Least required permissions (SELECT only)
Additionally:
- Pre-made permissions sets from least permissive to most.
- Read only (SELECT)
- CRUD (SELECT, INSERT, UPDATE, DELETE)
- Full app (SELECT,UPDATE,INSERT,DELETE,CREATE,ALTER,INDEX,DROP)
- Replication(REPLICATION SLAVE)
- Admin (ALL PRIVILEGES)
In the future, may also support additional database engines.
This is great if you just want to quickly copy paste a command and have your new Mysql users and database privileges ready at once .
As usual, managing this in code should be the preferred way of doings things, and in the end I’ve also added a page with instructions on how to create mysql users/grants with Ansible, Chef and Puppet.