MySQL Hostname
Posted: 27. September 2010 19:33
Hello:
I am new with MySQL, and wanted to clarify the hostname parameter to log in.
For example, on my fresh install of XAMPP, I can shell out and log into the MySQL console as follows:
# mysql -h localhost -u root
To create a new account that can only browse, I can use this format:
GRANT SELECT on testdb.* TO 'joesmith'@'coolwebsite.com' IDENTIFIED BY 'joespassword';
So, does MySQL check the hostname for validity. Otherwise, what use is it?
It seems like Joe could go to any computer on any host and login as follows:
#mysql -h coolwebsite -u joesmith -p joespassword;
Could someone explain the significance of including a host name?
Thanks,
Rich Locus
I am new with MySQL, and wanted to clarify the hostname parameter to log in.
For example, on my fresh install of XAMPP, I can shell out and log into the MySQL console as follows:
# mysql -h localhost -u root
To create a new account that can only browse, I can use this format:
GRANT SELECT on testdb.* TO 'joesmith'@'coolwebsite.com' IDENTIFIED BY 'joespassword';
So, does MySQL check the hostname for validity. Otherwise, what use is it?
It seems like Joe could go to any computer on any host and login as follows:
#mysql -h coolwebsite -u joesmith -p joespassword;
Could someone explain the significance of including a host name?
Thanks,
Rich Locus