This might be a question, but I am still having a little trouble understanding the user/host concept in MySQL. I am using Navicat to manage the database. I attached a screenshot.
| SitePoint Sponsor |





This might be a question, but I am still having a little trouble understanding the user/host concept in MySQL. I am using Navicat to manage the database. I attached a screenshot.





The host is where you are connecting to your database from. If it is on the same computer as you are using it is defined as localhost. I think you can also use 127.0.0.1 as well. If you were to have the database hosted on another computer you would have to allow a user to connect from that computer as well.Originally Posted by westmich
As far as users go root is the main user, you set up other users and privileges with that user. You shouldn't run any program as root so you should create another user to run. If you were in a multi user environment you can decide which users had access to which database/tables and also what they are able to do with the databases/tables. If you only wanted most users to view or select from a specific database then you could restrict that. YOu can restrict who can update records, who can change them etc.
See this link (http://www.mysql.com/documentation/m...tml#User_names) for setting up passwords for the users. You would also want to check out the GRANT/REVOKE syntax in the manual to find out specifics about limiting users.





I think I gotcha.
If I'm planning on connecting to my work server from home and my IP is 2.1.3.5, I would set-up MyAccount@2.1.3.5 - correct?
Does the database than verify that is where I came from and not let me connect from anywhere else including the localhost?
Bookmarks