Results 1 to 8 of 8

Thread: How to Connect to Online MYSQL Database?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    22

    Question How to Connect to Online MYSQL Database?

    Hi, i am trying to create a program to show the table data added in my website mysql database :V
    i have watched couple of youtube video's trying to figure out how to connect, none of them seems to work for me :v

    This is what i got so far :V

    Imports System.Data.SqlClient
    Imports MySql.Data.MySqlClient

    Public Class Form1
    Dim con As New MySqlConnection
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    con.ConnectionString = "server=ftp.x.com; Port=port; userid=user; password=pass; database=table"
    con.Open()
    MsgBox("sucess")

    End Sub

    End Class

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,344

    Re: How to Connect to Online MYSQL Database?

    Is your MySQL server configured to allow direct connections from the internet? That is considered a security risk and not enabled by default.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    22

    Re: How to Connect to Online MYSQL Database?

    So to "Remote Database Access Hosts" i add my own ip address?

    The error i get from running the program is, Same error as before i guess
    An unhandled exception of type 'System.TimeoutException' occurred in MySql.Data.dll

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    22

    Re: How to Connect to Online MYSQL Database?

    Still needing help with this :v

  5. #5
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: How to Connect to Online MYSQL Database?

    well, you never really answered the question... is the database server even accessible from the outside? Most hosts don't allow their database servers to be connected from the outside world. Usually (if they are half-way decent) will have the database servers sitting behind a fire wall. You need to know this info before we can go any further.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    22

    Re: How to Connect to Online MYSQL Database?

    Well i found this in their forum so, i think it is :v
    my website is on arvixe


    How can I connect to my MSSQL database remotely?
    Posted by Arvand Sabetian (Import) on 20 July 2009 04:52 AM
    To connect to your MSSQL database remotely, please use a client that is capable of communicating with our MSSQL 2008 server on the TCP protocol. A free client is provided by Microsoft at: http://www.microsoft.com/downloads/d...displaylang=en

    We recommend using Microsoft SQL Server 2008 Management Studio (link above) as many other tutorials and knowledgebase articles are written around supporting this free client by Microsoft. Only the 2008 version will be able to connect to our MSSQL servers. If you have the 2005 version, please upgrade. The 2008 client is backwards compatible with 2005 servers so you will still be able to connect to your MSSQL 2005 servers with the 2008 version.

  7. #7
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: How to Connect to Online MYSQL Database?

    MYSql or MSSQL? MSSQL usually means SQL Server... which is NOT MySQL... so that right there might be the problem.

    So, really, the first thing you need to decide is WHAT database system you're actually trying to talk to.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Nov 2012
    Posts
    22

    Re: How to Connect to Online MYSQL Database?

    hmm they do allow it
    Do you allow remote MySQL access?
    Posted by Arvand Sabetian (Import) on 26 December 2008 09:10 AM
    Yes.

    On our ASP plans, you can simply connect to the mysql server on port 3306 with the correct credentials. For hostname, simply use your domain name or the hostname of the server you are on (included in the setup email)

    On our linux plans, you would need to add your IP (or the IP of the host connecting to the database) under the "Remote MySQL" section of the control panel. If your IP changes, you can input '%' which is a wildcard for any IP to have the ability to connect to your databases.
    if this is not the answer ur looking for, help me out a little bit x.x
    i just manage the database via cpanel > phpmyadmin
    Last edited by naseeh; Nov 20th, 2015 at 04:04 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width