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
Related
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 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.
I'm having a problem running a MySQL server that is hosted on another server that isn't the web hosting server. Currently my web server is running on godaddy's free linux hosting. They do offer a MySQL database free, but you can't connect remotely (Sequel Pro OSX program) without paying for an upgraded hosting plan. So temporally, I'm going to host the database on my server at home (XAMPP). Well, whenever I try to connect to the database using the PHP command mysql_connect() I'm getting an error:
"Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110"
before it was saying 113 (I believe).
Any-who, I tied to use the 'Bind-address' and changed it from 12.0.0.1 to my LAN IP. it didn't work or I didn't do it right. So, any help I can get on this would be awesome.
FYI, I can connect to the database remotely from inside my network using Sequel Pro. But the godaddy server can't connect. Port is open also, so that's not the problem.
Out of the mouth of a godaddy support guy, "Our shared hosting plans do not give you the ability to connect to an external database. If you wish to have this ability, you would need to look into one of our server hosting options."
So, my configuration is correct, it's just godaddy has it blocked. Lame! Thanks everyone for the help.
If you're hosting your database to a home local machine, you should also redirect router "xxx" TCP port to 3306 TCP port of hosting pc.
Remember you must connect to WAN ip on port "xxx".
You can use free dns services like dyndns to map your internet connection to a name (example yourname.dyndns.org)
Redirect a port (default 3306) of your router to 3306 TC port of your hosting pc (internal)
From remote pc connect to yourname.dydns.org:3306 or to port you redirected on router