Access denied for user
-
In an attempt to create a database
new_database
Total adminer There's a mistake:Access denied for user 'ilnar'@'localhost' to database 'new_database'?
How?
-
If it's working out of the mouth, then you have to appoint a user.
ilnar
Right.I don't know if there's any way in here.
adminer
♪ I'm sure there is. You should search for this option in the program and assign the right to the user.If it's done through the OBD, it's gonna have to be a rut and do it.
GRANT ALL PRIVILEGES ON * . * TO 'ilnar'@'localhost'; FLUSH PRIVILEGES;
The stars on this team send a base and table, which will be accessible to the user. If you want to access any database or any table, put a star (*) instead of the name of the database or table.
FLUSH PRIVILEGES
- that changes enter into forceA scheme shall be used to assign rights to a particular user:
GRANT [тип прав] ON [название базы данных].[название таблицы] TO ‘[имя пользователя]’@'localhost’;
Types of rights:
ALL PRIVILEGES - даст пользователю MySQL полный доступ к заданной базе данных (если база данных не указана, то ко всем). CREATE - позволяет создавать новые таблицы или базы данных. DROP - позволяет удалять таблицы или базы данных. DELETE - позволяет удалять строки из таблиц. INSERT - позволяет добавлять строки в таблицу. SELECT - поволит использовать команду Select для чтения из баз данных. UPDATE - позволит редактировать строки таблиц. GRANT OPTION - позволит назначать или удалять права доступа для других пользователей.