I'm doing a project where I must do a query to a mysql server with the Sim900 module throught Arduino. Let me explain what I have, so that you can help me:
Arduino Uno (original version)
Sim900 module (https://www.amazon.es/gp/product/B07FS34P84/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1)
5V/2A Power Supply Adapter for Sim900 (https://www.amazon.es/gp/product/B07DX11WJJ/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1)
Windows Server 2012 with Static Ip (xxx.xxx.xx.xx), with a MySql Server that allows external connections (with an extern computer or smartphone, I can access the db)
First of all, I tried to do a query with the GChrome, like http://xxx.xx.xxx.xxx:3306/connect.php but this didn't worked. Then, I downloaded XAMPP and connected Apache and MySql. At that time, I writted in the Chrome search bar: http://localhost/connect.php and it said: Connected successfully so, at that moment I knew that I connected to the db.
So, I tried to connect with AT commands: First of all, I connected with the APN
AT+CSTT= "airtelnet.es", "vodafone", "vodafone"
and then I tried to connect with TCP to the server
AT+CIPSTART="TCP","xxx.xx.xxx.xxx","3306"
At this moment, the Serial Monitor gave me some errors and special characters.
Can someone help me with this?, what am I doing wrong?
Not sure what you want to do. Are you using sim900 for gprs as internet connection for Arduino? Do your arduino has shield for LAN cable.
If so, your xampp mysql should work as API server. Arduino will call url to send data, mysql is just internal job of server, no directly connection with arduino.
Related
I have a local project, that is a webapi (.net core 3.1) that connect with MySql (local server), good.
What I want to achieve, is do an image of my webapi (to pass then to production), I can do the image OK. But when I run the image, and I navigate via browser, I get the following error:
Microsoft.EntityFrameworkCore.Database.Connection[2004]
An error ocurred using the connection to database 'nameOfTable' on server 'localhost'
I didn't dockerize the mysql server, it's running as always, on local. I didn't change de user or the password... so I don't understand why I get this error.
Thanks in advance for your help!
When you run a container with your Web API image, the container has its own network and also IP address. If your MySQL instance works your local machine, not on docker-engine, you must have to connect your local to your docker container somehow which is not suggested. Instead of that, you may run a MySQL container that uses your local MySQL data (you can mount a local folder to the container with -v/volumes).
I want to develop a project for some college work. For this project i want to create a database in MySQL and I should be able to access this database from 2 different PC's which have MySQL workbench installed on it. I can use one of the PC's as the server or even a third PC as the server for the MySQL database. Someone please help me in doing this as i am unable to find any solutions online.
There's not much of an issue here.
Download and install the server from here.
Then install it on a computer within the same LAN of other computers
that will query the database.
Get the local ip of the computer on which the server is up and
running (on windows run cmd and then ipconfig) then look for
IPv4 Address value of the LAN.
Then establish the connection from other computers using that ip
value as host value configuration.
I'm not able to establish a connection to my MySQL server.
This is the connection string:
jdbc:mysql://<my_IP_address>:1005/rs_pm
This is the line of code:
var conn = Jdbc.getConnection(connString, mysql_user, mysql_pass);
I've been able to write a native Java program using JDBC and it connects just fine using the same connection string/username/password. (Yes, I know the port is non-standard but that's how I have it configured and it works with the native Java app).
The weird thing is, I'm looking at my router logs and when I try to connect with a native Java app I can see the traffic coming in. But when I run the script in G Apps I don't see any packets being received by Google IP addresses.
Is it just me? Is there a problem somewhere?
Thanks in advance.
Update So it appears that if I use the standard mysql port (3306), the connection works fine. It seems as though something in Google Apps won't try an outbound connection on the port I had specified (1005), or any other ports I tried. Perhaps the jdbc connector they use only supports port 3306? I will file a bug since this behavior isn't documented anywhere.
JDBC connection to a database server only supported to ports 1025 and higher.
I have a MySQL database on another windows computer (a server) that is setup locally using remote desktop connection for testing.
How can I connect to that local database to Visual Studio 2010 on "my computer"?
Server Computer(MySQL database setup local) --> My Computer(Visual Studio for test code..)
I am new to MySQL and any suggestions will help.
Thanks
PS: I have found this, but the "Server Name" for the database is 127.0.0.1 which I can't use because it is local on whatever computer you are on.
http://geekswithblogs.net/mbridge/archive/2010/12/13/visual-studio-2010-hosting--connect-to-mysql-database-from.aspx
You'll have to use the address of the computer that it is hosted on. It should be the same as the address you use to connect to the remote desktop session.
You might need to configure the firewall to accept the connection. You also might need to setup MySQL to allow remote connections with the user that you authenticate with.
I would recommend downloading MySQL workbench and install it on your local computer. Once you get the connection working with that, you should be able to use the connection with VS2010.
If you're not sure how to do the things listed above, you'll need to start out with a basic tutorial on setting up MySQL for remote connectivity.
I developed a project in VB.NET
In this project I want to use data from MySQL that is resides in my WEB Server.
I can communicate with the MySQL server of my localhost but can not communicate with the WEB Server.
In my CPanel I added Host from the Remote Database Access
But I can't communicate with WEB MySQL Server.
Please help me.
The first step is to try to connect to the web mysql with MySql Query Browser - that will tell you if the database is open for remote connections ( I assume it would fail)
I guess you have already checked it, but make sure you use the correct ip
EDIT:
As Björn said, your vb code is ok, so the problem is with the connection to the db.
Unfortunately that would be caused by many many reasons.
Are you sure you use a real IP from the host (and use it in the mysql settings)?
Are you sure you entered the correct remote host in the mysql settigns?
Are you sure you have correct connection string in the vb code?
Since your post indicates you can access the DB on your localhost, it doesn't seem to be an issue with the way you're connecting to the DB from your application (.NET-Connector?).
What does the external MySQL-Server say? Access denied? Or can't you reach it from the pc where your application is hosted (aka maybe a firewall regulation, other network etc.)?