-3

i am a student at computer science, i have made a project in c# that uses mysql for the database. now it's almost ready for deployment but i cant figure it out how to access the database stored on my computer from another device over the internet. i need a noob guide, what should i change?

string connection = "datasource=localhost;port=3306;username=root;password=123456";
MySqlConnection myConn = new MySqlConnection(connection);

i have used mysql workbench to manipulate the database. thank you very much. and sorry for my english.

4
  • How can it almost be ready for Deployment if you cannot access the Database Commented Mar 13, 2015 at 11:43
  • This may help: stackoverflow.com/questions/14801948/… Commented Mar 13, 2015 at 11:45
  • The problem is that your database is located on your computer and not on a server designed to handle remote calls to the database. Either you need to do like David Soussan said, or you need to use a remotely hosted MySQL server, and connect to that one. -1 because this is something you should have been thought on your computer science studies, or should have read up on before using SQL for remote calls. Commented Mar 13, 2015 at 11:49
  • i can access it from my laptop and it works flawless all that i need now is to access it from another laptop. sorry maybe i am a little to rushed. Commented Mar 13, 2015 at 11:54

1 Answer 1

0
  1. Get a static IP address for your internet connection.
  2. Open port 3306 on your firewall.
  3. Change the datasource in the connection string to the IP address of your internet connection.
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.