Author Topic: METEOBRIDGE PRO : ERROR IN SQL SYNTAX - MySQL services not working  (Read 121 times)

0 Members and 1 Guest are viewing this topic.

Offline Marcel

  • Member
  • *
  • Posts: 2
Hi All,

I am using this query in the MySQL services tab from a Meteobridge Pro:

INSERT INTO wassenaarstrand (ID, DateTime, TempOutCur, WindSpeedCur, WindDirCur, WindGust10, WindDirAvg10) VALUES (default, '[YYYY]-[MM]-[DD] [hh]:[mm]:[ss]', '[th0temp-act]', '[wind0wind-act=kn], '[wind0dir-act]', '[wind0wind-max10=kn], '[wind0dir-avg10]')

The response is an error in SQL syntax: who can spot the error ??? Many thanks in advance !

Offline galfert

  • Forecaster
  • *****
  • Posts: 1234
Re: METEOBRIDGE PRO : ERROR IN SQL SYNTAX - MySQL services not working
« Reply #1 on: February 01, 2019, 03:23:37 PM »
You are missing a lot of single quotes. I don't know if that matters or not. But what I have is working for me. I'm using MariaDB 10 on the back end for the server on my Synology NAS.

For comparison here is my Meteobridge SQL Query:
INSERT INTO `mystation` (`ID`, `DateTime`, `TempOutCur`, `HumOutCur`, `PressCur`, `DewCur`, `HeatIdxCur`, `WindChillCur`, `TempInCur`, `HumInCur`, `WindSpeedCur`, `WindAvgSpeedCur`, `WindDirCur`, `WindDirCurEng`, `WindGust10`, `WindDirAvg10`, `WindDirAvg10Eng`, `RainRateCur`, `RainDay`, `RainYest`, `RainMonth`, `RainYear`, `UV`, `Solar`) VALUES (NULL, '[YYYY]-[MM]-[DD] [hh]:[mm]:[ss]', '[th0temp-act=F]', '[th0hum-act]', '[thb0seapress-act=inHg.2]', '[th0dew-act=F]', '[th0heatindex-act=F]', '[wind0chill-act=F]', '[thb0temp-act=F]', '[thb0hum-act]', '[wind0wind-act=mph]', '[wind0avgwind-act=mph]', '[wind0dir-act]', '[wind0dir-act=endir]', '[wind0wind-max10=mph]', '[wind0dir-avg10]', '[wind0dir-avg10=endir]', '[rain0rate-act=in.2]', '[rain0total-daysum=in.2]', '[rain0total-ydaysum=in.2]', '[rain0total-monthsum=in.2]', '[rain0total-yearsum=in.2]', '[uv0index-act]', '[sol0rad-act]')
« Last Edit: February 01, 2019, 04:24:28 PM by galfert »
WS-2000 & WS-2902A | ObserverIP | WeatherBridge (Meteobridge)
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Tele-Pole flag pole is here (not installed yet)

Offline Marcel

  • Member
  • *
  • Posts: 2
Re: METEOBRIDGE PRO : ERROR IN SQL SYNTAX - MySQL services not working
« Reply #2 on: February 01, 2019, 03:40:35 PM »
adjusted the single quotes everywhere, still no joy

INSERT INTO 'wassenaarstrand' ('ID', 'DateTime', 'TempOutCur', 'WindSpeedCur', 'WindDirCur', 'WindGust10', 'WindDirAvg10') VALUES (NULL, '[YYYY]-[MM]-[DD] [hh]:[mm]:[ss]', '[th0temp-act]', '[wind0wind-act=kn]', '[wind0dir-act]', '[wind0wind-max10=kn]', '[wind0dir-avg10]')

Offline galfert

  • Forecaster
  • *****
  • Posts: 1234
Re: METEOBRIDGE PRO : ERROR IN SQL SYNTAX - MySQL services not working
« Reply #3 on: February 01, 2019, 04:29:37 PM »
Check username and database name and password on both SQL server and Meteobridge, just reenter them.

Check your SQL Host IP address and port on the Meteobridge setting for the SQL server. I had to change mine to 3307 to match my SQL server.
 [ You are not allowed to view attachments ]

Run a port scanner. I like Angry Port Scanner. There is PC version and Android version. Or use your favorite other network port scanner. Do a custom port scan for just the IP address of your SQL server along with just the one and only port for your SQL. Mine is port 3307. Check that it comes back as OPEN.

Check your SQL server that you don't have a typo in the station name and all of the data column names that you are using.

 [ You are not allowed to view attachments ]
« Last Edit: February 01, 2019, 05:22:52 PM by galfert »
WS-2000 & WS-2902A | ObserverIP | WeatherBridge (Meteobridge)
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Tele-Pole flag pole is here (not installed yet)