having a login in a windows form that uses a remote MySql database
-
I am learning visual basic, i have asked questions before and got great answers and oping for a little bit of help again if no one is busy :) I am a trainee web designer/developer and have my own website, which i am currently designing. Now i have planned it all out and wish to create a Visual Basic.NET program. I wish for both the website and the program to have the same logins, both using a MySql database. The website is using a simple script by me for the login at the moment. I didn't want to over complicate it, till i have the Vb program connecting to the database too. Heres a simple breakdown: 1. Both website and program use same login credentials and same MySql database. 2. Visual Basic program connect remotely to the Mysql database. ( with a shared host ) The program would go about it by basicly starting with a mysql connection then, accessing both username and password tables and checking is Username.TEXT & Password.TEXT match with the database. Once matches, then load up Mainfrm Sorry for the big message. I have did research on how i would go around doing this. Nothing i can find suggests how i could connect to a remote database on a shared host with (cPanel) Some of the code im using just now to open the connection, but not sure how to connect to my databse :
Dim connect As New MySqlConnection Dim sqlcommands As New MySqlCommand Dim myConnString As String Dim UserID As Integer myConnString = "server=" & My.Settings.HostIP & ";" \_
My.Settings.HostIP - code i have put in settings file all it contains is my website which doesn't work, of course hehe XD I have the import mysql client. Any help would be great thanks. Ofc im not asking someone to do all the work, just asking for some help or ways to improve what i have.
-
I am learning visual basic, i have asked questions before and got great answers and oping for a little bit of help again if no one is busy :) I am a trainee web designer/developer and have my own website, which i am currently designing. Now i have planned it all out and wish to create a Visual Basic.NET program. I wish for both the website and the program to have the same logins, both using a MySql database. The website is using a simple script by me for the login at the moment. I didn't want to over complicate it, till i have the Vb program connecting to the database too. Heres a simple breakdown: 1. Both website and program use same login credentials and same MySql database. 2. Visual Basic program connect remotely to the Mysql database. ( with a shared host ) The program would go about it by basicly starting with a mysql connection then, accessing both username and password tables and checking is Username.TEXT & Password.TEXT match with the database. Once matches, then load up Mainfrm Sorry for the big message. I have did research on how i would go around doing this. Nothing i can find suggests how i could connect to a remote database on a shared host with (cPanel) Some of the code im using just now to open the connection, but not sure how to connect to my databse :
Dim connect As New MySqlConnection Dim sqlcommands As New MySqlCommand Dim myConnString As String Dim UserID As Integer myConnString = "server=" & My.Settings.HostIP & ";" \_
My.Settings.HostIP - code i have put in settings file all it contains is my website which doesn't work, of course hehe XD I have the import mysql client. Any help would be great thanks. Ofc im not asking someone to do all the work, just asking for some help or ways to improve what i have.
This tutorial can help you [^] If you still have errors (after properly initializing the connection string), you should also create mysql user in cPanel and grant connect to the database right.
-
This tutorial can help you [^] If you still have errors (after properly initializing the connection string), you should also create mysql user in cPanel and grant connect to the database right.