MyTetra Share
Делитесь знаниями!
MySQL Commands
Время создания: 13.07.2018 15:30
Текстовые метки: linux mysql command
Раздел: MySQL
Запись: Velonski/mytetra-database/master/base/1491979473f0e4bbbk2r/text.html на raw.githubusercontent.com

INSERT INTO user (host, user, password, select_priv, insert_priv, update_priv) VALUES ('localhost', 'supersim2014', PASSWORD('3rwoti2twJbNvcmVayJq'), 'Y', 'Y', 'Y');


GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'%' WITH GRANT OPTION;

This is how I create my "Super User" privileges (although I would normally specify a host).


IMPORTANT NOTE

While this answer can solve the problem of access, WITH GRANT OPTION creates a MySQL user that can edit the permissions of other users.


The GRANT OPTION privilege enables you to give to other users or remove from other users those privileges that you yourself possess.


For security reasons, you should not use this type of user account for any process that the public will have access to (i.e. a website). It is recommended that you create a user with only database privileges for that kind of use.


FLUSH PRIVILEGES;

(for update changes in access rights)

 
MyTetra Share v.0.59
Яндекс индекс цитирования