1

基本上,我想创建一个这样的应用程序:YOUTUBE

我想创建一个应用程序,当我从我的网络主机(PHP 或 MYSQL)添加一些信息时,VB.NET 会读取它。

4

1 回答 1

0

From your website you'll need to insert the data into your MySQL database.

The problem with using the database provided by your web host is that the chances are, due to 'Security Reasons' the will have disabled external access.

This means that any files outside of your web server (your sites root/sub directory) will not be able to access the data. So, while your website will be able to connect without a problem, your program will not.

Some hosts give its customers the opportunity to add an IP address to a white list which enables them to bypass their security system. However, most will not give you this option.

My suggestion is that you either rent a VPS where you can run both the WebServer and Your MySQL database (and PHPMyAdmin) from or Set Up A MySQL database on your PC (its not that difficult just read the manual and youll be fine). If you had a VPS then you would no longer need your pre hosted webserver as you could run your own. You would need to point your domain name to your VPS webserver. It will act just like any other.

By running your own MySQL Databse you are given the option to enable remote access. This means that any external entity with the correct details will be able to connect.

If you cant get a VPS or don't want to run your own server or rent a server that allows for external access. Check out db4free.net .They provide you with a free MySQL Database with external access for Developers to test out their systems. They are not ultra fast so that's something you may want to be aware of. Another thing is that your data that's held can be removed at any time. The servers are not there to be used permanently just for testing.

So how do I connect to it through VB???

Good Question! To establish a connection, I suggest you use MySQL.Data library provided my DevMySQL themselves and import it into your program. Done so by Imports MySQL.Data.MySQLClient. This is written by them to work with their databases. Yes you can connect using some of the functions already in VB but in my opinion they don't work as efficiently. You'll need to download the MySQLConnector to connect as well.

Hopefully That Answers Your Questions. Any Problems Just Comment below!

Regards

Joe

于 2013-04-11T16:46:49.073 回答