connecting Arduino and mysql using USB

Hi, I'm trying to connect my arduino Uno with mysql database in my pc. I tried different methods but none of them are working.

  • Using mysqlio (site w/ new, errorless library is down. mysqlio.shivy.in)
  • Using python (looks like it works only for macOS and linux. My pc is windows. All hail windows)

Is there any way you guys know to do this?

All I wanna do is write a data in the database. If you know the link to mysqlio mysql.h library (new flawless one) that could help too. ethernet is not a solution :)

All I wanna do is write a data in the database.

Without an ethernet shield, the only way that the Arduino can communicate with the PC is via the serial port. Some application on the PC needs to be listening to the serial port. On your PC, what application is listening to the serial port that the Arduino is connected to?

PaulS: Without an ethernet shield, the only way that the Arduino can communicate with the PC is via the serial port. Some application on the PC needs to be listening to the serial port. On your PC, what application is listening to the serial port that the Arduino is connected to?

I have no idea about this serial port. My pc is a laptop. (sorry about that)

( Do computers still have those? So does this means USB cannot be used for data logging? Still I found those web sites about that? )

mysqlio seems to work right?

Sorry I am a newbie (obviously :disappointed_relieved: )

I can't use Tx and Rx as I am using a gsm module

bunny9: I can't use Tx and Rx as I am using a gsm module

For what?

Part of the project. I wanna log the msg came from gsm (splitted into two after receiving) to a database in the computer. long story :'(

So is there any way that I can log this in to mysql database in the computer? Thou I can't use mysqlio and serial port there has to be a way, right? This is arduino we are talking about :)

Sounds like this is exactly what you need: https://github.com/tttapa/Projects/tree/master/Arduino/NodeJS/Database/Arduino-NodeJS-MySQL-Serial-Data-Logger

If you're using an Arduino UNO, there's no way to use the USB port if you have something connected to the RX & TX pins (pins 0 and 1).

Pieter

If you're using an Arduino UNO, there's no way to use the USB port if you have something connected to the RX & TX pins (pins 0 and 1).

Keep in mind that the GSM does not HAVE to be connected to the hardware serial pins.

It is still not clear what the GSM shield is for. It CAN be used to make GET requests, just like an Ethernet shield. So, you could have web server software, like Apache, running on a computer. The GSM shield can connect to the server and execute scripts (PHP is a good choice for the scripting language), that can connect to the MySQL database on that computer (or any other computer).