dcsimg
Results 1 to 5 of 5

Thread: VB .Net Program Interfacing With SQL Database On Linux Hosting?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    78

    VB .Net Program Interfacing With SQL Database On Linux Hosting?

    Ok I am confused to how this would be done, I am on Linux Hosting and have created a test database via cpanel but unfortunately can not get it to connect via VB. Net in Visual Studio. I have added the connection details via add connection for MySQL but when I press the Test Connection button I get an access denied message. I am wondering if I am missing a setting or option somehow. I was told by another forum member that I would need some type of server side program to basically kind of be in the middle to access the database because of security reasons. Yet I can not fully understand why this would be necessary..

    However I was also told, "Interfacing with a db doesn't require Windows, you just need a connection (either through drivers or a valid connection string)."

    I would need anyone who has my software to be able to access the database, thousands of different users, it will be a chat program.

    So why can I not connect to my test database?

    Would it make a difference if I created the database via Visual Studio and then uploaded it to my Linux Server/Host or would this not work?

    I was told by a forum member also that many hosts disable this functionality. It this true and how can I make it work or are today's web hosting standards just updated to the point where they just don't really allow this? I don't really see how it could be a problem as long as users are using the vb .net software to access the database with the correct details. I mean isn't it meant to do this? I just don't really want to have to create/add a middleware program on the server unless really required to do so. I am stuck on this issue.. Thanks

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    100,586

    Re: VB .Net Program Interfacing With SQL Database On Linux Hosting?

    Have you confirmed with your host that you can access this database directly over the internet? What connection details did they provide (minus credentials, of course)? What does your connection string look like? If you can't connect then there are really only t3wo possibilities: your connection string is wrong or the database is not accessible over the internet. We can't guess which it is in your case.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2018
    Posts
    78

    Re: VB .Net Program Interfacing With SQL Database On Linux Hosting?

    I have not yet confirmed with my host but will check with them but as I said I just hit the test connection button, with the correct credentials so it is not the connection string since I am just clicking the Test Connection button.. I probably have to check with my host and ask them.. I will let you know.

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    100,586

    Re: VB .Net Program Interfacing With SQL Database On Linux Hosting?

    Quote Originally Posted by DreamWarrior77 View Post
    I probably have to check with my host and ask them.
    Someone probably should have told you to do that a couple of days ago. Oh, hang on...
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    40,341

    Re: VB .Net Program Interfacing With SQL Database On Linux Hosting?

    Quote Originally Posted by DreamWarrior77 View Post
    I was told by a forum member also that many hosts disable this functionality. It this true and how can I make it work or are today's web hosting standards just updated to the point where they just don't really allow this? I don't really see how it could be a problem as long as users are using the vb .net software to access the database with the correct details.
    Most hosts do disable it, because if you don't get everything 100% correct (and very few people are even capable of that), you will almost certainly have your database abused/stolen/destroyed on a regular basis - and potentially do significant damage to the hosts systems (which you may have to pay very heavily for, because you created the security risk).

    For example, what steps would you take on the database side to ensure it is actually your VB.Net software that is connecting, rather than a hacker?

    I mean isn't it meant to do this? I just don't really want to have to create/add a middleware program on the server unless really required to do so. I am stuck on this issue.. Thanks
    No, it isn't meant to do that... the database is meant to be used within the web site.

    While is is possible to expose the database to the internet, that doesn't just open a tin of worms, it opens up a warehouse full of them.

    I understand why you want to avoid the effort of creating middle-ware, but creating/using a web service is actually far less effort than any sensible alternatives - it is dramatically less effort than even reading the names of all the different things you need to protect against (and protecting against just one of them would probably take more effort than the web service).

    I recommend reading the article How to connect to a database on the internet from our Database Development FAQs/Tutorials (at the top of the Database Development forum)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width