MySQL Tutorial/Privilege/Remote User — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 13:44, 26 мая 2010
Designate an IP or host address from which the user can connect
GRANT ALL PRIVILEGES
ON myDatabase.*
TO newuser@192.168.0.2
IDENTIFIED BY "newpassword";
Give a non-local user permissions on the database for use with remote clients.
GRANT ALL PRIVILEGES
ON myDatabase.*
TO newuser@192.168.0.2
IDENTIFIED BY "newpassword";
Now a user on the machine "192.168.0.2" can connect to the database.
To allow a user to connect from anywhere you would use a wildcard "%"
GRANT ALL PRIVILEGES
ON myDatabase.*
TO newuser@"%"
IDENTIFIED BY "newpassword";