Trying to set up ODBC Connection from my PC to MYSQL hosted on DiscountAsp.Net

Discussion in 'Databases' started by drewzzzz, Nov 11, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I am trying to establish a connection so that I can run Crystal reports on my machine to create reports from data in our db hosted by discount. I cant seem to get this to work... I do this another of our remote databases but that one is located inside an office i have VPN access too... any ideas?
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    What database are you connecting to?

    do you get any error when you try to test the connection?

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. The database I am trying to connect to is MySQL database: MYSQLDB_3137</o:p>

    I get an access denied :(

    Verifed user name and pass... using the correct case. Tried both standard MSYQL Drivers.
     
  4. That won't work unless you have the right login and access permissions. VPN connection authenticate you so that you are a bonified member of a workgroup and domain. I doubt if discountasp will change their athentication and permissions to allow you to do this.
     
  5. You should be able to do this. I have set up a system DSN, using the mySQL ODBC 3.51 driver, to connect to mysql01.discountasp.net with my database name, username, and password on the standard port of 3306. Works like a charm. My development pages on my local machine pull data from my live mySQL database on the DASP server (by connecting to my system DSN).


    Is this how you are attempting to connect?



    Mike Reilly, Secretary/Webmaster
    Kiwanis Club of Rancho Penasquitos
    "Serving the Children of the World"
    [email protected]
    (760) 419-7429
     
  6. Bruce

    Bruce DiscountASP.NET Staff

    yes. you should be able to connect from a remote location as long as the port is open.

    check your f/w

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
    • I connect to my dicountasp database using both ODBC and also the native connector-net


    (native works faster: must include Mysql.data as a reference)
    1. Public AdapterMain As New MySql.Data.MySqlClient.MySqlDataAdapter
    2. Public MainConnection As New MySql.Data.MySqlClient.MySqlConnection
    3. MainConnectString = "Persist Security Info=True;database=MYSQLDB_XXXXX;server=;host=" &amp; DBhost &amp; ";username=" &amp; DBusername &amp; ";password=" &amp; DBpassword &amp; ";"
    4. MainConnection.ConnectionString = MainConnectString
    5. Try
    6. MainConnection.Open()
    7. Catch e1 As Exception
    8. MsgBox(e1.Message &amp; " Could not Open the Main Database")
    9. Return
    10. End Try
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page