A
A
adrash kh2019-04-10 10:23:58
MySQL
adrash kh, 2019-04-10 10:23:58

How to create a user for a remote database?

Good afternoon.
I have ssh access to mysql. And I have a specific database to which I must create a user. How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-04-10
@Zlatan77

We enter via ssh and start the mysql console. We execute
the lines there:

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

www.mysql.ru/docs/man/Adding_users.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question