Server-Client Data Exchange using MySQL (VB.Net) - vb.net

Here's the situation. I developed a simple examination system with registration forms. I used VB.Net as the programming language. I haven't tried manual coding for my problem yet.
Anyway this is a project for the company from which I am an intern.
The plan is to get every client pc to have this examination/registration application and this application will send the personal info and the score to a central database(server pc).
I used MySql as the dbms and developed the application on the same machine which means that the Database server I used is only on the local host.
Now I was about to try to implement the application to one client pc(as a beta test) and installed the necessary files(.net framework) and I also installed MySQL Server(and workbench) in the server pc.
When I run the application in the client PC it didn't detect/connect to the ServerPC's MySQL server instance and therefore was not able to record the dummy values I input in the client application. Take note I changed the connection string of my app to point to the ip address of the serverPC.
Now my questions are the following:
1)What have I done wrong?
2)Should I install the MySQL Server(and Workbench) to every ClientPC so that I can create a server instance that uses the REMOTE HOST option and configure it such that it will connect to the SERVERPC's Database?
3)How should I setup the server so it gives access to the application I installed in all clientPCs?
I'm pretty new to VB.net and mostly learned from internet sources. I haven't tried manual coding. Mainly because the tools in VB.net are slightly easy to understand thanks to intellisense,the drag and drop tools and also the help topics.
Anyway I hope anyone helps me. Advance Thanks and If the information i've given is not quite complete please point out to me which info I forgot to add.
EDIT:
Additional info, the client pcs and the server pc is in one network.
I also granted every privelege to the serverPC settings of MySQL.(it's just for the test run)

Did you enable the MySQL user for localhost only access? You can check this in MySQL control center by browsing to your 'mysql' database, 'users' table, am ensure the host field of the user is set to % and not localhost, allowing them to connect on any NIC, not just the loopback (localhost) adapter.

Related

How to run desktop application using SQL Server database on other computer without LAN or on different ip address like as web based

i have a problem i'm new in window form application in C#. Currently finished
a app that run on LAN means on the same network.
my Question is that i want to run the this application on different places
means online this app using single sever .
please suggest me what i do for that
Thanks to every one.

VB 2010: Connect Application To an IP address

I am trying to modify a program I have built in using VB 2010.
It is a Race Manager for Car Races.
I would like to connect my application to an IP address where the time and scoring sends out laptimes for each car and driver and the position of every car on track.
I know the IP address and the Port.
Any idea about the path i need to follow to be able to show the data from Time and scoring on my software correctly?
Thank you
I'm not sure of your question, but to connect to another computer you can try using sockets and I suppose this app you are doing is a client side (in Networking terms) because if its a server it would only listen for incoming connection requests so here is what I have used on my project.
I've installed Visual Basic 5.0 because I also use it to create unInstalled programs. So it came with a very nice tool called Winsock which I used to make my apps communicate with one another over network so it you have it on your computer I think your life will be a bit easier so you need to load it to VB 2010 as a tool and add it to your project then depending on how you want your app to connect to remote pc but I made mine connect on form load meaning on startup. So here is how you connect it using Winsock:
' Connecting
AxWinsock1.RemoteHost = "The IP address you want to connect to here"
AxWinsock1.RemotePort = "The Port you planing to use here"
AxWinsock1.Connect()
' Send data
AxWinsock1.SendData("Your data here")
There you are connecting and sending data.
Hope this answered your question.

Setting up a server at home for Android app

I'm currently developing a simple multiplayer game app for Android and I need to have a server to which the users connect to.I'd like to set up this server at home. I have a dynamic IP address,so someone told me I'd have to set up a local DNS server or something like that. I'm not even sure where to start with setting up a DNS server, everything I found was for windows 2003 and linux. Nothing for XP? If any one can shed some light on this matter, explain a bit how setting a DNS works or supply a link with "setting up local DNS for dummies" I'd be grateful.
Also, besides setting up a DNS so I can find the server every time, how about the communication with it? I'd like for it to be as secure as possible. Another friend told me something about communicating via SSH, which is again something I am not accustomed to.
So if someone could explain some of these concepts or offer some GOOD link for that that would be great. I'm very confused :)
Thanks
EDIT
Btw, the server is in Java and currently i'm communicating from Android emulator to the server (which is localhost) via sockets.
That's not a simple thing you're trying to achive. First you have to create your own server on your machine (maybe you're done with this step), then you have to make this server available for everyone. At this point, I suggest the DynDNS service:
http://lifehacker.com/124804/geek-to-live--how-to-assign-a-domain-name-to-your-home-web-server
A local DNS by default help you to find your own servers by name instead of IP address, but if you have a usual internet service with dynamic IP, you need an external DNS provider to route your clients to your server. (read the link above for the full explanation)
About the SSH security: Yes, you will need some security settings indeed, but that could be a very hard problem sometimes. You can set your server to work with SSL sockets, which is a part of the core J2SE release. It will work against some sort of attack, but none against others. Running your own server will raise unexpected numbers of problems, prepare for that.
As already stated in the comment to your post, something like http://www.no-ip.com or http://www.dnsdynamic.org would solve the issue with your dynamic ip - You do not need a local DNS server.
With regards to communication, i believe that SSH is linux/unix only. Since you wish to use Windows for the server, FTP or Remote Desktop would be best. Choose FTP if all you want to do is manage your files, choose remote desktop if you wish to manage your entire computer. I've had good results with the FileZilla FTP server on windows (http://filezilla-project.org/)
With that said, i think you would be better off buying a simple and cheap hosted service instead of using your own computer - you can get something that can run your java app for $5/month some places, and compared with the annoyance of having a local server running in your house, it might be worth it.

Authentication between Windows and Linux servers on two hosts but same domain - possible?

We have an issue that I can't wrap my head around regarding possible solutions.
We have a site that runs off of a Dot Net Nuke CMS, with a custom asp.net CMS powering a reviews engine aspect of it too. This is hosted on a Windows server setup on SQL servers and has its own user registry.
We are looking at a script for an add on revenue offering, and the best of breed we have found happens to be Linux-based using MySQL servers. There are some other options, but none are nearly as robust as the Linux based one.
Our quandry is two-fold:
1) If we use this script, we will need to host a linux server with a different host service (ours only does windows servers). Both server sets will point to the same domain (www.mydomain.com) and have communication between the MySQL DB on the Linux machine and the SQL DB on the Windows machine.
Is this possible...and problematic? Or is this a fairly straightforward issue to solve?
2) The larger issue if the first is a hurdle that can be cleared is we would want to share our user registry between the two databases, so the user would not be logging into each DB when going between the two environments.
This issue is more complex than my understanding of authentication and databases so I'm hoping someone can help me out or at least start me in a good direction for research.
We could go with the other script routes, but they simply don't offer the functions or features of the more difficult to implement code.
OK, you can always run MySQL on the Windows box and install cgywin to run the script in a more unix type environment. Or run xampp on a different port: http://www.apachefriends.org/en/xampp.html

Online product demo environment for Windows applications

I'm looking for a way to allow potential customers to try my application before they buy it.
The product is a windows forms application that requires an SQL Server database to operate.
Although I have a functional demo that the customer can install on their network, I want to make it easier for them by have them "play" with it at my environment.
I remember Microsoft had (has?) something similar. I was testing Visual Studio a few years ago in a virtual environment where I was connecting to a server at Microsoft.
They setup the environment this way so when a user logs off after using it rollback his actions. Or to explain it better: when a user logins it starts with a new, clean environment.
So any projects I've created testing Visual Studio were lost after I logged off.
Any suggestions?
Thanks.
Some solutions that come to mind:
Provide remote access
You could provide access to a running instance of your application via some sort of remote connection protocol, e.g. via RDP or via VNC.
For example, there is a Java VNC client which can run as a Java applet; you could put that on a webpage and have it connect to a VNC session you host on your servers.
Or use Windows Terminal Server, and allow connection via RDP.
Both solutions of course have the drawback that people need to open the appropriate ports, if they are behind a firewall. There might be ways around that, however (e.g. you can run VNC over HTTP).
VM image
A completely different solution: Provide a ready-to-run VM image (for VMWare, VirtualBox or similar) of your application, including server and everything. You would need a demo version of your app though, plus getting redistribution rights for all the proprietary components (Windows OS, SQL server) might get hairy.
Offer videos
Often people do not really need to actually use the app; they are mainly interested to see how it works. So maybe it is enough to host videos of the app in operation. That allows you to put in some advertising for your features, and lets you show the users what they might miss when testing on their own.