June 19

Create mysql/mariadb DB and user

mysqladmin create somename_workdb

for user from any host:

CREATE USER 'somename_workdb'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON somename_workdb.* TO 'somename_workdb'@'%';
FLUSH PRIVILEGES;

for user from localhost only:

CREATE USER 'somename_workdb'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON somename_workdb. * TO 'somename_workdb'@'localhost';
FLUSH PRIVILEGES;

 

Add remote host to firewall in order to allow connection to mysql:

 

tcp|in|d=3306|s=host_ip


Copyright 2021. All rights reserved.

Posted 19 June 2017 by admin in category "simple memo

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.