Connection to MySQL
-
Hello Friends, I am developing an windows application in which i need to connect to MySQL Server through my application mean user enter the User Name and Password after that in a list box all the database of MySQL comes in Listbox. So my problem is how to connect to MySQL database through my application Please help me i am new in database.. Thanks
-
Hello Friends, I am developing an windows application in which i need to connect to MySQL Server through my application mean user enter the User Name and Password after that in a list box all the database of MySQL comes in Listbox. So my problem is how to connect to MySQL database through my application Please help me i am new in database.. Thanks
Download and use MySQLConnector .NET[^]
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
Hello Friends, I am developing an windows application in which i need to connect to MySQL Server through my application mean user enter the User Name and Password after that in a list box all the database of MySQL comes in Listbox. So my problem is how to connect to MySQL database through my application Please help me i am new in database.. Thanks
You can use ADO.NET[^] to create a connection to the database and then query all databases using a SqlCommand. To connect to the database you need a valid connection string[^]. I'd recomment to use the MySQL .NET connector[^] to use for this task. regards
-
You can use ADO.NET[^] to create a connection to the database and then query all databases using a SqlCommand. To connect to the database you need a valid connection string[^]. I'd recomment to use the MySQL .NET connector[^] to use for this task. regards
Sir as you give me the link of connection string that is used to connect to MySQL server that's great but as i want to connect to like this user will enter Server Name, UserID and Password in the available textboxes and after that it will click on connect button that it should connect with all the available databases and shows them in Listbox Thanks
-
Sir as you give me the link of connection string that is used to connect to MySQL server that's great but as i want to connect to like this user will enter Server Name, UserID and Password in the available textboxes and after that it will click on connect button that it should connect with all the available databases and shows them in Listbox Thanks
I'm not sure if you can connect to the server without specifying a valid database. Maybe you should once connect to a database and then issue the SHOW DATABASES SQL command to get a list of the databases available to use for the next DB login from the listbox.
-
Hello Friends, I am developing an windows application in which i need to connect to MySQL Server through my application mean user enter the User Name and Password after that in a list box all the database of MySQL comes in Listbox. So my problem is how to connect to MySQL database through my application Please help me i am new in database.. Thanks
$user="UsernameForYourMySqlDB"; $pass="PasswordForYourMySqlDB"; $db="YourDB_Name"; $link=mysql_connect("localhost",$user,$pass); if(!$link) die("Couldnt connect to MySQL"); mysql_select_db($db,$link) or die ("couldnt open $db: ".mysql_error()); print "connected to $db";
CheeN