I have a feeling this is a really embarrassing newbie question, but I'm not a complete newbie. Here goes anyway.
When I began to configure my existing SkyWeather2 for the new solar AQ and Lightning sensors, I ran into a problem with mosquitto (among other things, I didn't know the password to make any configuration changes. I can elaborate but that info isn't relevant to this query). Fair enough; I ordered an SDL SD card, which just came today.
I got the pi back on the network with the SD card, did a git pull to update, and copied over my SkyWeather2.JSON file from the previous image. All testing went well.
When I went to officially start SkyWeather2.py, this happened:
[email protected]:~/SDL_Pi_SkyWeather2 $ sudo python3 SkyWeather2.py ./SkyWeather2.JSON File exists -------- MySQL Database WeatherSenseWireless Updates Not Installed. Run this command: sudo mysql -u root -p WeatherSenseWireless < updateWeatherSenseWireless.sql SkyWeather2 Stopped -------- SkyWeather2 Requirements Error Exit
OK, I can do that. But:
[email protected]:~/SDL_Pi_SkyWeather2 $ sudo mysql -u root -p WeatherSenseWireless < updateWeatherSenseWireless.sql Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
What am I doing wrong here? I didn't run into this issue when I did my original install on a fresh Buster image.
That error means you haven't been authenticated by the database - probably a password problem
Make sure you can log into the database with the command and then enter your password (don't know what SDL's default is).
[email protected]:~/SDL_Pi_SkyWeather2 $ sudo mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 9837 Server version: 10.3.27-MariaDB-0+deb10u1 Raspbian 10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
If you can do this check to make sure the WeatherSenseWireless exists with this command
MariaDB [(none)]> show databases; +----------------------+ | Database | +----------------------+ | SkyWeather2 | | WeatherSenseWireless | | information_schema | | mysql | | performance_schema | | phpmyadmin | +----------------------+ 6 rows in set (0.001 sec)
MariaDB [(none)]> If you can log in OK and the database exists - I'm not sure what the problem could be.