News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

MySQL Tutorial » Privilege » Remote User

Started by VelMurugan, Apr 21, 2009, 12:27 PM

Previous topic - Next topic

VelMurugan

Give a non-local user permissions on the database for use with remote clients

QuoteGRANT 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.

Designate an IP or host address from which the user can connect
Quote
GRANT ALL PRIVILEGES
ON myDatabase.*
TO newuser@192.168.0.2
IDENTIFIED BY 'newpassword';

To allow a user to connect from anywhere you would use a wildcard '%'


QuoteGRANT ALL PRIVILEGES
ON myDatabase.*
TO newuser@'%'
IDENTIFIED BY 'newpassword';

Source : java2s