Categories
Mariadb

mariadb user and permissions

grant privileges. here are some good commands to remember:

create user `airports`@`localhost` identified by 'my-password'
grant usage on airports.* to `airports`@`localhost`;
grant all privileges on `airports`.* to `airports`@`localhost`;
select user,host from mysql.user where user like 'airports';
+----------+-----------+
| User     | Host      |
+----------+-----------+
| airports | %         |
| airports | localhost |
+----------+-----------+
flush privileges;
debugging:
select user()
select current_user()