The "mysql.users" table is used to specify which users are allowed to connect from where and what permissions they have. You can edit this table in the normal way (followed by "FLUSH PRIVILEGES"), or via the use of the GRANT statement.
You can use ordinary SQL statements to manipulate the table. First, see what it contains:[tt]
SELECT user,host FROM mysql.user[/tt]
then you can update the table as required, for example:[tt]
UPDATE mysql.user SET host='192.168.1.%' WHERE user=''[/tt]
The syntax of the "host" field is the same as a LIKE string, where "%" means any number of any characters. You then need to apply the changes:[tt]
FLUSH PRIVILEGES[/tt]
Alternatively, you can use the special SQL statements CREATE USER, DROP USER, GRANT, and REVOKE. These are explained in the MySQL manual, with good examples.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.