If you set mysql to externally connectable root@%, you will not be able to create
GRANT ALL PRIVILEGES ON shop.shop TO root@'%'
Authorization
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, CREATE ROLE, DROP ROLE ON *.* TO 'root '@'%' identified by 'root';
That's it
mysql
If you did it exactly as the question said, isn't it because there is an extra half-width between the username and @
?
The command you executed:
GRANT ALL PRIVILEGES ON shop.shop TO root@'%'
Originally to execute commands:
GRANT ALL PRIVILEGES ON shop.shop TO root@'%'
The error message also appears to be playing 'root'
with a username that contains spaces as follows:
...TO'root'@'%'
If you give me permission later, I can do it
GRANT ALL PRIVILEGES ON shop.shop TO root@'%'
Commands to Execute:
GRANT ALL PRIVILEGES ON shop.shop TO root@'%'
© 2024 OneMinuteCode. All rights reserved.