I have a database in my localhost(Use WAMP server).I have created a WiFi network among several laptops.There is a C# application on client laptop which need to use the database in server(This application uses the data in the database).How do I do this?
(The client laptop can connect to my wamp server through browser successfully with address
192.168.16.2).
You need to do three things
Ensure that the application has the correct details to make the connection i.e username, password, database and hostname
Ensure that the server is using TCP/IP protocol (perhaps SSL) and that the firewall will not prevent incomming connections.
Ensure that the database user can connect from the remote machine. This can be achieved using the Workbench application.
Related
I am working on deploying my Django project on Linode. My MySQL database that I used during development was on a ubuntu server that I have at my house. This was different that the computer I wrote the program on. In the settings.py file I had the database connections set up and working. On my personal server at home I have updated the UFW to allow the new linode ip address and granted privileges to the ip address also. When I go to run the server on deployed project on linode, I get an error (2003, "Can't connect to MySQL server on 'personal server ip address':3306' (110)").
How do I get the linode server to be able to talk to my personal server's MySQL database?
Iiuc, you are trying to connect from linode to your home server - this is an odd configuration and will be problematic
what you need to do is to allow incoming connections at the router level so that packets are not dropped via port forwarding - I think your router is blocking the incoming DB connection
But like Yevhen said - it is a better approach to have MySql in Linode directly
I am new to setting up SSL certificates on servers and would need some help to secure a MySQL database connection. I have a simple mobile app (client) which needs to connect to a remote MySQL database (server) connection. I am using AWS EC2 for the remote server and I have installed Let's Encrypt SSL certificates on a domain that I am hosting there. The machine runs on Ubuntu 18.04 and NGINX.
The same server also runs a MySQL database and I want to connect to it securely using a mobile app client. How can I encrypt the connection between the mobile app aclient and the MySQL database server?
I do have a static ip address for the database server but I am unable to install SSL certificates on the ip address directly. Only the domain name has an associated SSL certificate.
I did some digging around but was unable to find anything that serves my purpose. Any suggestion or reference to an article would greatly help.
This article provides a detailed step by step procedure for securing the connection between a remote MySQL database server and a client.
Securing a remote MySQL database server connection
I have a MySql Server 5.7 running as service on one computer of a LAN.
My application is installed and running fine on the same computer. I have 'Shared with everyone' set for the directory where my application is located. In the same directory I have put the libmysql.dll and the FDConnectionDefs.ini files.
My application is running fine on that computer. On the other computers on the LAN I created a link to the directory where my application is shared. When I try to run my application from these LAN systems they produce the error message
[FireDac][Phys][mySql] can't connect to mySql server 127.0.0.1 on port 3306... (10061).
All machines are running Windows 10 on 64 bit processors.
Here what i've tried to resolve the problem:
make sure that the user, password and host (%) are the same in mySql Profile and FDConnectionDefs.ini.
I've tried with different users even with root, i've tried to change host (%) to put the IP address of the computer trying to connect in the mySql profile.
I make sure that i have permissions to run my application and mySql and that the port 3306 is open in the Firewall/Kaspersky on each computer of the LAN. But always the same error message.
127.0.0.1 is a special IP address - the "loopback" address that is typically resolved for localhost on most systems. It is a private internal IP address that a computer can use to refer to itself. It has no meaning to other systems on a LAN since every computer will recognize 127.0.0.1 as meaning itself.
This means that when you are running the application on a remote system it will be trying to connect to a MySQL server running locally rather than on a server elsewhere.
You'll need to configure your FireDac components to connect to the actual LAN IP address that belongs to the system hosting the MySQL server. You will probably also need to make sure that your MySQL users are set up to authenticate from an IP other than localhost.
I created a mySQL database on one machine in my local network. Lets say, I install my application on a friends computer at his house. I have a computer set up as a server running the mySQL database at my house. If that computer is running, how can I make my friends computer send and receive data from the mySQL database on my network?
I am using JDBC and the J connector. I currently can connect to the database with JDBC, so I am currently good with that.
How can I make my friends computer send and receive data from the mySQL database on my network? Will I need a service like Google Cloud SQL or is there any other free way?I also want to make it so that I can email any friend with the program, and they can install it and the program connects to the MySQL server without Andy router extensional. Is a MySQL database even the way to go?
Edit: Basically, I made an MySQL database on a local computer and am able to save data to it from a JDBC program. I want the SQL database to be online so if I send the program to somebody else, they can open it and it accesses the online database. How should I go about making an online SQL database which has no limitations on what IP address accesses it?
Assuming you have a NAT router connecting your local network to the Internet, set up port forwarding on your router to forward port 3306 to the database machine on your network.
Then your friend would specify your router's public IP as the hostname when making the database connection.
In your MySQL configuration, you'll need to create a user username#your-friend's-IP, and grant it access to your your database tables.
A MySQL client (the thing running on your friend's local network) initiates a connection to a MySQL server by requesting a TCP connection on port 3306 (usually).
So your friend's computer has to be able to initiate a connection to your computer. Most home networks have routers between them and the internet service provided. Routers, unless specially configured, ignore attempts to connect from the public internet.
You need to configure your router to pass port 3306 connections through to your computer. Then you need to figure out the ip address by which your internet service provider addresses your router and your friend's router (usually the router user interface will tell you this). Then you need to set up a username / ip address / password triple on your MySQL database authorizing your friend to connect.
Finally, keep in mind that your internet service provider probably assigns both of you dynamic ip addresses; they might change.
I have developed a .net 4.0 Windows forms application that is supposed to execute on the client side (all client desktops are windows based with .net 4 framework installed). On the other hand, the server is a Linux server that has a MYSQL database.
I need to know what I need to do in order for my winforms application (on client desktops) to gather/write data from/to the MYSQL database on the server.
Do I need to do some server side programming/scripting in order for the winforms to communicate with the server.
I am new to this, kindly excuse if something sounds 'stupid'.
I am not .net proficient, but most 2 or 3 tiered applications work the same:
In your application, you should have access to a DB driver - like ODBC - which handles the connection with the DB server, sends it all the queries, and receives the results. All you have to do is specify the connection parameters:
DB server address
DB server port
DB user name
DB user password
On the server side, you need to configure the server to accept incoming connections from the client:
setup the DB service: install the DB server and configure it
configure user and database: create the schema, create the user account, populate the tables
setup the network: create the firewall rules to let the DB port open to your client connections
And that should be it. Since you will probably have to download the MySQL odbc connector, I suggest that you also consult its documentation, which provides tutorials and walk-throughs.