consolewd mysql issues

Thanks mate, no panic. Im sure you have plenty of more important things to do. I found the code on an old post here somewhere

CREATE TABLE IF NOT EXISTS wx_data (
time time NOT NULL DEFAULT ‘00:00:00’,
date date NOT NULL DEFAULT ‘0000-00-00’,
mintemp float NOT NULL DEFAULT ‘0’,
maxtemp float NOT NULL DEFAULT ‘0’,
temperature float NOT NULL DEFAULT ‘0’,
average_windspeed float NOT NULL DEFAULT ‘0’,
wind_direction float NOT NULL DEFAULT ‘0’,
gust_windspeed float NOT NULL DEFAULT ‘0’,
UV float NOT NULL DEFAULT ‘0’,
barometer float NOT NULL DEFAULT ‘0’,
daily_rainfall float NOT NULL DEFAULT ‘0’,
monthly_rainfall float NOT NULL DEFAULT ‘0’,
yearly_rainfall float NOT NULL DEFAULT ‘0’,
hourly_rainfall float NOT NULL DEFAULT ‘0’,
rain_rate float NOT NULL DEFAULT ‘0’,
max_rain_rate_curent_day float NOT NULL DEFAULT ‘0’,
monthtodatemaxtemp float NOT NULL DEFAULT ‘0’,
monthtodatemintemp float NOT NULL DEFAULT ‘0’,
day_hours varbinary(20) NOT NULL DEFAULT ‘0’,
forecast_icon float NOT NULL DEFAULT ‘0’,
yesterday_rainfall float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_1 float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_2 float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_3 float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_4 float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_5 float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_6 float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_7 float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_8 float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_9 float NOT NULL DEFAULT ‘0’,
extra_temperature_sensor_10 float NOT NULL DEFAULT ‘0’,
extra_humidity_1 float NOT NULL DEFAULT ‘0’,
extra_humidity_2 float NOT NULL DEFAULT ‘0’,
extra_humidity_3 float NOT NULL DEFAULT ‘0’,
extra_humidity_4 float NOT NULL DEFAULT ‘0’,
actual_solar_reading float NOT NULL DEFAULT ‘0’,
current_windchill float NOT NULL DEFAULT ‘0’,
current_humidex float NOT NULL DEFAULT ‘0’,
current_weather_desc float NOT NULL DEFAULT ‘0’,
barometer_trend_last_hour varchar(20) NOT NULL DEFAULT ‘0’,
todaywindrun float NOT NULL DEFAULT ‘0’,
max_gust_current_day float NOT NULL DEFAULT ‘0’,
dew_point_temperature varchar(20) NOT NULL DEFAULT ‘0’,
cloud_height float NOT NULL DEFAULT ‘0’,
current_heatindex float NOT NULL DEFAULT ‘0’,
soil_moist float NOT NULL DEFAULT ‘0’,
leaf_moist float NOT NULL DEFAULT ‘0’,
lightning_last_hour float NOT NULL DEFAULT ‘0’,
temp_change_last_hour varchar(20) NOT NULL DEFAULT ‘0’,
UNIQUE KEY Index (date,time)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=‘wx_data from Weather Display’;

I actually have a new mysql program working on my unbuntu linux desktop , using the table structure from the normal windows version mysql
and I have been able to add data to that
so that is one (and I should be able to get that working on OSX too)

as for the problem with consolewd
it might be that it can not find libmysqlclient.so
try installing libmysqlclient-dev

Thanks, Yes i did have to manually install the package as when running cronmysql it complained about the library missing. Is it the correct process to run ./cronmysql to test connectivity?

If i run ./cronmysql2 i get the following

An unhandled exception occurred at $00037268 :
EDatabaseError : Circular datasource references are not allowed.
$00037268
$00036AF4

./cronmysql
Cronmysql vers 1.5
Access violation
Verify infos are entered correctly in config.txt

OK, I fixed it :slight_smile:
at least on my linux desktop
(I can now compile on raspberry pi)
question: what version of mysql?
my fix is compiled to vers 5.7

To be honest not sure as don’t know a heap about it. I think it is actually a variant maria DB
±------------------------±-------------------------+
| Variable_name | Value |
±------------------------±-------------------------+
| innodb_version | 5.6.35-80.0 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 10.1.23-MariaDB-9+deb9u1 |
| version_comment | Raspbian 9.0 |
| version_compile_machine | armv7l |
| version_compile_os | debian-linux-gnueabihf |
| version_malloc_library | system jemalloc |
| version_ssl_library | YaSSL 2.4.2 |
| wsrep_patch_version | wsrep_25.19

try
http://www.weather-display.com/downloadfiles/cronmysqlpi.zip

I have now updated the cronmyql program and added a croncreatetable
to create the table in the correct format
in that link above

I still must be doing something wrong
root@nairneweather:/home/pi/consolewdfiles# ./cronmysql
connecting to 127.0.0.1 nairneweather nairneweatherstation wx_data
Access violation
Verify infos are entered correctly in config.txt
Database “nairneweatherstation”

I was concerned it is a permissions issue however i can create the table using my mysql user account and the code i pasted above

root@nairneweather:/home/pi/consolewdfiles-old/mysqlDB# mysql -u nairneweather -p nairneweatherstation < /home/pi/consolewdfiles-old/mysqlDB/wx_createtable
Enter password:

the table structure you have used is not actually correct (nearly)
try running the croncreatetable
and see what that reports

I have tested and it does all work here

I’m not sure if the original poster ever got this working, but I’d suggest trying to run it (consolewd and cronmysql) as root to rule out any local system permission issues. However, I’m running consolewd as a new basic user and the only special permissions I had to set were for access to the USB device. Everything is working fine, except the SQL part.

I’m also using Raspbian 9 and MariaDB 10.1.23. However, it’s not the access violation that’s my problem. It appears to not like MariaDB. I’ve tried the new cronmysql, from this thread, but the error is the same (only wanting version 5.6, instead of 5.5)

TMySQL56Connection can not work with the installed MySQL client version: Expected (5.6), got (10.1.23-MariaDB).

I can’t find any way of getting mysql 5.5 or 5.6 installed, and unfortunately I can’t spoof the MariaDB version in 10.1. It’s apparently a feature in 10.2, but 10.1 is the latest for Raspbian 9.4.

Are we able to get support for MariaDB, please? :slight_smile: Hopefully it’s just a matter of accepting the name/version

I can compile against vers 5.5

MariaDB 10.1 is supposed to be binary compatible with MySQL 5.7. Can we get consolewd to also check for usable MariaDB versions?

Maybe this helps?

Unfortunately, there’s no ARM package for 10.2. I’d have to try and compile from source. It would be great if consolewd could just check for compatible MariaDB version responses :slight_smile:

Sorry for the kick, but I tried adding the version=“5.6” option in /etc/mysql/my.cnf , it didn’t have the expected effect.

Besides that

connecting to localhost root weather data TMySQL56Connection can not work with the installed MySQL client version: Expected (5.6), got (10.3.15). Verify infos are entered correctly in config.txt Database "weather"
remains, the output of
sudo mariadb --version
changed from
mariadb Ver 15.1 Distrib 10.3.15-MariaDB, for debian-linux-gnueabihf (armv8l) using readline 5.2
to
mariadb: option '--version' cannot take an argument

edit: Found the right libmysqlclient.so.18 in http://security.debian.org/debian-security/pool/updates/main/m/mysql-5.5/libmysqlclient18_5.5.62-0+deb8u1_armhf.deb , after unpacking that and manually putting (just) that lib in the right place no errors anymore. Well, not the ones I had (from before symlinking libmariadbclient.so to libmysqlclient.so). Now I’m stuck at the “access violation” error.

anyone had anymore luck with this one
I’m getting this one TySQL56Connection can not work with the installed MySQL client version: Expected (5.6), got (10.1.38-MariaDB) similar to the above
Cheers

its expecting mysql version 5.6
i,e libmysql vers 5.6
maybe install that?

raspbian only supports maria db 10.1 :frowning:
hitting this error now
Now I’m stuck at the “access violation” error.

Might have to give the sql db a miss :frowning:

i could look into a way to use maria db
as spare time permits

bumping this topic to see if there is a solution.

I don’t have any issues connecting to the DB that is on a hosted server from the Raspi box using:


mysql --host [domain].com -u [username] -p[password] --database [database_name]