createuser - How to create a user in mySql, including password -
i created new user inserting user table in mysql database - showed error saying there no such column titled "password". column responsible password in user table in mysql database?
mysql> insert user (host, user, password, select_priv, insert_priv, update_priv) values ('localhost', 'guest', password('guest123'), 'y', 'y', 'y');
this way create new user in mysql
create user 'newuser'@'localhost' identified 'password';
and way give user permission:
it seems permission of user "parser" not correct. can check configuration of user statement.
select * information_schema.user_privileges;
if have granded user new permission have reload settings. can this flush privileges;
how grant different user permissions:
- all privileges- saw previously, allow mysql user access designated database (or if no database selected, across system)
- create- allows them create new tables or databases
- drop- allows them them delete tables or databases
- delete- allows them delete rows tables insert- allows them insert rows tables
- select- allows them use select command read through databases
- update- allow them update table rows
- grant option- allows them grant or remove other users' privileges
to provide specific user permission, can use framework:
grant [type of permission] on [database name].[table name] ‘[username]’@'localhost’;
i hope solve issue. never forget flush!!!
Comments
Post a Comment