0

A string is needed for the parameters to connect to the phpmyadmin

 MyConnectionString = "Server=localhost;Database=database;Uid=root;Pwd=";

I have setup a web server using xampp, it has also its own domain using no-ip.biz and can be accessed online. I have a c# program that changes the values in the myphpadmin of the web server. I can access and the change the values if the program is in localhost and running on the server machine. My question is what will i place in the "Server=" so that the program can make changes to the web server database thru the internet? I have searched multiple questions but all uses localhost. I have also tried to place the domain and the ip address of the web server in the "Server=" but it still cant connect.

Do i need to place something in the "Server=" and/or do i need to change some settings on xampp/phpmyadmin on the web server?

2
  • 1
    I think, you probably want to connect to mysql server - phpmyadmin is only webgui for mysql manage. So, your question should be different Commented Nov 15, 2013 at 12:13
  • Yes thats what i wanted Commented Nov 15, 2013 at 12:18

1 Answer 1

1

What you want to do is access your MySQL server remotely. PHPMyAdmin is just a front end for that, not the database itself.

MySQL allows remote connection, but depending on the server configuration it may or may not be enabled. It's hard to say without knowing your setup, but if you have control of the server then following a guide such as this one may work. This SO question addresses doing it on Windows.

REMEMBER that enabling remote access is always potentially risky. Make sure you have a strong password set for all databases before allowing remote access. I'm not too familiar with MySQL's remote access setup, but it may be that you can restrict access to particular databases and users. If you can, do it. Consider also only allowing access from the IP addresses you're running your application on. You may also need to forward the port that MySQL uses through your firewall. It's generally 3306, but you can change it in the configuration.

Once you've enabled remote access then it should be as simple as putting the server address instead of localhost (ie example.no-ip.com).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.