Dan Lewis wrote:
I can connect to the MySQL server (5.5) on the same computer
using localhost. But how do I connect to a MySQL server on another
computer on the same network? I can not find it in the MySQL manual, or
I don't know where to look in it.
I use MySQL Workbench for administrative purposes.
--Dan
Hi Dan,
When you define your MySQL-database under LO-Base, specify the hostname (or the
IP-address) of the server as well as the port (usually 3306) instead of "localhost".
I am actually using a MySQL-server over the internet. It works o.k....
Regards H
More information: My laptop is 192.168.2.101 and the MySQL server is on 192.168.2.100. The database I want to access is Budget.
I entered Budget as the database name, Server as 192.168.2.100, port is 3306. I then test the connection, enter the user name and password. The error message I get is "Host '192.168.2.101' is not allowed to connect to this MySQL server".
I am using the MySQL JDBC driver, and when I click the "Test Class" button, I get the message "The JDBC Driver was loaded successfully."
Any suggestions as to what I might be doing wrong?
--Dan
Sounds like the server is not configured to allow you access. Since the IP addresses for the server and your computer are on the same LAN, I can assume the MySQL server is on another computer on the same LAN. You don't say if you did this in mysql:
GRANT ALL PRIVILEGES ON *.* TO <username>@hostname IDENTIFIED BY `<password>` WITH GRANT OPTION;
Note that the "hostname" should be the IP address of your laptop, or 192.168.2.101 . Note that the IP address may need " around it due to the periods and numbers.
If not, the server will not allow you access. The laptop is not "registered" as a trusted computer. You must have done this for your other computer, but you need to do it for all computers you need access for. Or, if you are brave, you can use "%" for any host: <username>@"%". Or, better yet, you can limit access to your LAN: <username>@"192.168.2.%"
For further information, this can be found in the MySQL reference manual under "Access Control, Stage 1: Connection Verification".
Hope this helps.
Girvin Herr