22
Мар
0

Добавление нового пользователя в MySQL

для добавления создания нового пользователя и новой базы данных
mysql -uroot -p

>CREATE DATABASE <NEWDB_NAME>;
GRANT ALL PRIVILEGES ON <NEWDB_NAME>.* TO 'add_user'@'localhost'
 IDENTIFIED BY 'add_password' WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON *.* TO 'add_user'@'localhost'
 IDENTIFIED BY 'add_password' WITH GRANT OPTION;

доступ для add_user с любого хоста
GRANT ALL PRIVILEGES ON <DB_NAME>.* TO 'add_user'@'%' 
  IDENTIFIED BY 'add_password' WITH GRANT OPTION;
Enjoyed reading this post?
Subscribe to the RSS feed and have all new posts delivered straight to you.

Comments are closed.

Celadon theme by the Themes Boutique