Is there any way to connect MySQL server using IP, Port, Database Name, Username and Password of MySQL server with NetLinx or any interface between NetLinx and MySQL Server?
You can access a MySQL database with PHP queries. Google the MySQL website and look for their PHP API. Then just open port 80 connection and send your query or post your changes. It works quite well, although I am using Duet to do the work. Should be similar functionality directly from Netlinx.
Even i'm trying i!-DatabasePlus, But it is compatible with Microsoft SQL and good solution for database connection. I need to connect with MySQL server and it has also to talk with NetLinx. Pls suggest on the same.
You can access a MySQL database with PHP queries. Google the MySQL website and look for their PHP API. Then just open port 80 connection and send your query or post your changes. It works quite well, although I am using Duet to do the work. Should be similar functionality directly from Netlinx.
As you suggested, accessing MySQL with PHP works well. But i need to connect MySQL Server Database with NetLinx. For my case NetLinx and MySQL should communicate, else database connectivity with Duet also fine. pls get me the solution for the same. Can you pls explain briefly if you are using Duet for the connection.
I am using Duet to connect to MySQL database. The database is hosted in the cloud by our website host. Network Solutions provides a very nice platform that includes the ability to create MySQL databases on their servers. All I do is open a connection to our website on port 80 and then do a GET via a URL connection with a string similar to:
In my case, Network Solutions even provides database management that helps create and test the queries online before I apply them to code.
Unfortunately, the code itself is part of a very large program and pulling out the specifics would not be that easy.
If you know how to do a GET in Java, that's really all you do here. Or even open a socket on port 80 and send the GET string as discussed elsewhere on several threads.
Correct me if I am wrong svTech, but you are suggesting using a PHP web page to bridge the MySQL database to the NetLinx processor, correct?
That is how I am doing it. Basically, I created a few pages using PHP to give me a way to submit data to the MySQL database. I also have a way to send data back to the NetLinx processor. I control the language/syntax/formatting used, so I just make up something that is easy for me to use on both sides.
Couldn't you also just connect directly to the MySQL server? MySQL uses port 3306 as default so I beleive you can just brush up on MySQL commands and deal directly with the server. PHP is only needed to bridge HTML web pages to the MySQL server making me think Netlinx can talk directly.
I'm not sure if I've ever tried this or not and I might be completely wrong but it seems like it should work. When I last played with MySQL I did use PHP and Apache bundled in xampp http://www.apachefriends.org/en/xampp.html but that was because I was playing with web pages.
Even i'm trying i!-DatabasePlus, But it is compatible with Microsoft SQL and good solution for database connection. I need to connect with MySQL server and it has also to talk with NetLinx. Pls suggest on the same.
DatabasePlus work with any ODBC compatible database server, including MySql. DatabasePlus comes with all the tools and helps auto-creates the NetLinx code using a wizard.
Couldn't you also just connect directly to the MySQL server?
Not without implementing the MySQL protocol. Port 3306 does not support text-based commands and queries, it uses a binary protocol that is documented but quite crufty from years of revisions. Implementing it in NetLinx would be on the scale of implementing HTTPS -- possible, but almost certainly not worth it.
i!-DatabasePlus is the same as the PHP bridge idea, only written in ASP and with a wizard for configuration so you don't have to write the ASP code yourself.
Correct me if I am wrong svTech, but you are suggesting using a PHP web page to bridge the MySQL database to the NetLinx processor, correct?
That is how I am doing it. Basically, I created a few pages using PHP to give me a way to submit data to the MySQL database. I also have a way to send data back to the NetLinx processor. I control the language/syntax/formatting used, so I just make up something that is easy for me to use on both sides.
Jeff
I guess the right answer is yes and no. I don't use a web page, per se, but I do call PHP scripts that handle the heavy lifting with the MySQL server and simply respond with the results back to Duet. The scripts are stored on the web server that hosts the database. But the scripts are protected from just anyone accessing them. You can access the scripts from a browser to test them, but they are not part of a web page themselves.
This may not have been obvious when I referred to using PHP directly from Duet/Netlinx.
Comments
http://www.amx.com/products/i!-DatabasePlus.asp
Even i'm trying i!-DatabasePlus, But it is compatible with Microsoft SQL and good solution for database connection. I need to connect with MySQL server and it has also to talk with NetLinx. Pls suggest on the same.
As you suggested, accessing MySQL with PHP works well. But i need to connect MySQL Server Database with NetLinx. For my case NetLinx and MySQL should communicate, else database connectivity with Duet also fine. pls get me the solution for the same. Can you pls explain briefly if you are using Duet for the connection.
http://www.yourwebsite.com/path_to_db/post_db_file.php?<enter query terms here>
In my case, Network Solutions even provides database management that helps create and test the queries online before I apply them to code.
Unfortunately, the code itself is part of a very large program and pulling out the specifics would not be that easy.
If you know how to do a GET in Java, that's really all you do here. Or even open a socket on port 80 and send the GET string as discussed elsewhere on several threads.
That is how I am doing it. Basically, I created a few pages using PHP to give me a way to submit data to the MySQL database. I also have a way to send data back to the NetLinx processor. I control the language/syntax/formatting used, so I just make up something that is easy for me to use on both sides.
Jeff
I'm not sure if I've ever tried this or not and I might be completely wrong but it seems like it should work. When I last played with MySQL I did use PHP and Apache bundled in xampp http://www.apachefriends.org/en/xampp.html but that was because I was playing with web pages.
http://dev.mysql.com/doc/refman/5.6/en/connecting-disconnecting.html
DatabasePlus work with any ODBC compatible database server, including MySql. DatabasePlus comes with all the tools and helps auto-creates the NetLinx code using a wizard.
To setup your MySql on a DSN for ODBC connection.
http://dev.mysql.com/doc/refman/5.0/en/connector-odbc-configuration-dsn-windows.html
Not without implementing the MySQL protocol. Port 3306 does not support text-based commands and queries, it uses a binary protocol that is documented but quite crufty from years of revisions. Implementing it in NetLinx would be on the scale of implementing HTTPS -- possible, but almost certainly not worth it.
i!-DatabasePlus is the same as the PHP bridge idea, only written in ASP and with a wizard for configuration so you don't have to write the ASP code yourself.
I guess the right answer is yes and no. I don't use a web page, per se, but I do call PHP scripts that handle the heavy lifting with the MySQL server and simply respond with the results back to Duet. The scripts are stored on the web server that hosts the database. But the scripts are protected from just anyone accessing them. You can access the scripts from a browser to test them, but they are not part of a web page themselves.
This may not have been obvious when I referred to using PHP directly from Duet/Netlinx.