Steve R.
Retired
- Local time
- Today, 17:13
- Joined
- Jul 5, 2006
- Messages
- 5,316
This is a follow up to Connecting to MySQL
I was able to successfully connect Access on one computer to MYSQL on a second computer using LINUX (UBUNTU). I laid the project aside for a while since UBUNTU issued a new version 9.04.
An issue that I was attempting to resolve concerned how to create a static IP address for the LINUX computer. I wasn't able to do it. Anyway, I had one of those moments of inspiration while doing nothing where I came up with an alternative, to use the hostname of the LINUX computer. That was partially successful.
The code from the Access computer below works
On the LINUX computer the MY.CNF file has the following
When I attempt to use the bind address using the host name "steven-desktop" instead of 192.168.1.102 to connect, it fails. Any additional thoughts?
One option, it I get ambitious, would be to pump ifconfig through grep, pick up the current ip address, replace it in the MY.CNF file.
Alternatively, I can go back to trying to figure out how to assign a static IP address. But that is not my question now.
I was able to successfully connect Access on one computer to MYSQL on a second computer using LINUX (UBUNTU). I laid the project aside for a while since UBUNTU issued a new version 9.04.
An issue that I was attempting to resolve concerned how to create a static IP address for the LINUX computer. I wasn't able to do it. Anyway, I had one of those moments of inspiration while doing nothing where I came up with an alternative, to use the hostname of the LINUX computer. That was partially successful.
The code from the Access computer below works
Code:
Private Function ConnectString() As String
Rem Connect to MySQL MySQL MySQL MySQL MySQL
Rem ADOX ADOX ADOX ADOX ADOX ADOX ADOX ADOX
Dim strServerName As String
Dim strDataBaseName As String
Dim strPassword As String
Dim strUserName As String
Rem strServerName = "192.168.1.102"
strServerName = "steven-desktop"
strDataBaseName = "world"
strUserName = "steve"
strPassword = "whatever"
ConnectString = "Driver={mySQL ODBC 3.51 Driver};" & _
"Server=" & strServerName & _
";DATABASE=" & strDataBaseName & ";" & _
"USER=" & strUserName & _
";PASSWORD=" & strPassword & _
";OPTION=3;"
End Function
On the LINUX computer the MY.CNF file has the following
Code:
bind-address = 192.168.1.102
#bind-address = steven-desktop
When I attempt to use the bind address using the host name "steven-desktop" instead of 192.168.1.102 to connect, it fails. Any additional thoughts?
One option, it I get ambitious, would be to pump ifconfig through grep, pick up the current ip address, replace it in the MY.CNF file.
Alternatively, I can go back to trying to figure out how to assign a static IP address. But that is not my question now.