Re: [weewx-user] Chronology

2018-08-20 Thread John Clark
A modicum of success. I have mysql running and weewx on the Pi. 
Information is uploading to website, but I still can't view with 
localhost. (but I can live with that) Now all I need to do is copy 
databases from one computer to the other (I hope)



On 8/20/2018 6:22 PM, Pat wrote:

You can also use MySQL without a password if you switch users to root.

At the risk of confusing things further because I believe you should 
use sqlite for its simplicity and portability


You can try sudo su It may or may not challenge you. If it does Type 
in your pi password


Then typemysql and it should let you into the console. From there you 
can complete the commands above to find permissions.


garagepi.png 





On Monday, August 20, 2018 at 5:25:34 PM UTC-4, Thomas Keffer wrote:

You have a MySQL password problem. Straighten that out. Or, use
sqlite.

Focus on the system log. Forget about the webserver for a moment.
The log will tell you what is going on. You should learn how to
cut and paste from it. The easiest is:

$ cat /var/log/syslog

(this will print out a *lot* of text)

Then highlight what you want to copy, then right click and select
"Copy". Then paste into your email app.

If your email is on a different machine, then ssh

into the RPi, then do the above.

-tk

On Mon, Aug 20, 2018 at 2:05 PM John Clark > wrote:



On 8/20/2018 1:49 PM, Thomas Keffer wrote:

John,

Please don't summarize what you're finding. Cut-and-paste
explicitly into the email. For example, when you say '**I get
access denied**' when trying to use mysql, did it prompt for
a password first (it should have)? You should have given it
the MySQL root password you used when setting up MySQL. If
you don't remember it, then you're stuck. Reinstall, and this
time remember it.  Incidentally, this is a good example of
how MySQL is more difficult to manage.


I tried "weewx" as it said in the weewx.conf file, and I also
tried the system root password.



I don't know what you mean by anything in the "grins and
giggles" paragraph. What "not found" error? And, again, don't
summarize what you think you're seeing in syslog --- post it.


It is my assumption that Apache is running here.


Don't take these setbacks personally. The RPi is not out to
get you. Give it the right commands and it will do the right
thing.

-tk




I never take it personally. I always tell people that
computers are very literal, and very stupid. They will only do
exactly what you tell them, so if something doesn't work as
planned, you aren't telling them correctly.


On Mon, Aug 20, 2018 at 11:32 AM John Clark > wrote:



On 8/20/2018 12:24 PM, Thomas Keffer wrote:

Nothing wrong with the Rapsberry Pi as a platform:
thousands of WeeWX users are using it successfully.
However, you should reconsider your decision to use
MySQL if you are not familiar with it. It is much more
complex to administer then the default sqlite database.

In any case, check the access permissions for user
weewx. To do this, run 'mysql' either as user weewx or
user root. Then use the SHOW GRANTS command:

$ *mysql -u root -p
*
mysql> *SHOW GRANTS FOR 'weewx'@'localhost';
*


$ mysql -u root -p **I get access denied**
mysql> SHOW GRANTS FOR 'weewx'@'localhost'; **I get no
results**

Just for grins and giggles I set it to use sqlite and it
did "run" but there was nothing displayed with
"localhost/weewx" just the "not found"error and according
to the syslog it wasn't uploading to my website*.

*So, I am gonna give it a break before I use a hammer on
it. THEN, I'm not sure WHAT I'll do.*
*
-- 
*/John Clark /*
-- 
You received this message because you are subscribed to

the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails
from it, send an email to weewx-user+...@googlegroups.com
.
For more options, visit
https://groups.google.com/d/optout
.

-- 
You received this message because you are subscribed to the

Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to weewx-user+...@googlegroups.com
.
For more options, visit https://groups.google.com/d/optout
.

Re: [weewx-user] Chronology

2018-08-20 Thread Pat
You can also use MySQL without a password if you switch users to root. 

At the risk of confusing things further because I believe you should use 
sqlite for its simplicity and portability

You can try sudo su It may or may not challenge you. If it does Type in 
your pi password

Then type mysql and it should let you into the console. From there you can 
complete the commands above to find permissions. 

[image: garagepi.png] 




On Monday, August 20, 2018 at 5:25:34 PM UTC-4, Thomas Keffer wrote:
>
> You have a MySQL password problem. Straighten that out. Or, use sqlite.
>
> Focus on the system log. Forget about the webserver for a moment. The log 
> will tell you what is going on. You should learn how to cut and paste from 
> it. The easiest is:
>
> $ cat /var/log/syslog
>
> (this will print out a *lot* of text)
>
> Then highlight what you want to copy, then right click and select "Copy". 
> Then paste into your email app. 
>
> If your email is on a different machine, then ssh 
>  into the 
> RPi, then do the above.
>
> -tk
>
> On Mon, Aug 20, 2018 at 2:05 PM John Clark > 
> wrote:
>
>>
>>
>> On 8/20/2018 1:49 PM, Thomas Keffer wrote:
>>
>> John,
>>
>> Please don't summarize what you're finding. Cut-and-paste explicitly into 
>> the email. For example, when you say '**I get access denied**' when trying 
>> to use mysql, did it prompt for a password first (it should have)? You 
>> should have given it the MySQL root password you used when setting up 
>> MySQL. If you don't remember it, then you're stuck. Reinstall, and this 
>> time remember it.  Incidentally, this is a good example of how MySQL is 
>> more difficult to manage.
>>
>>   I tried "weewx" as it said in the weewx.conf file, and I also tried 
>> the system root password.
>>
>>
>> I don't know what you mean by anything in the "grins and giggles" 
>> paragraph. What "not found" error? And, again, don't summarize what you 
>> think you're seeing in syslog --- post it. 
>>
>>   It is my assumption that Apache is running here.
>>
>> Don't take these setbacks personally. The RPi is not out to get you. Give 
>> it the right commands and it will do the right thing.
>>
>> -tk
>>
>>
>>
>> I never take it personally. I always tell people that computers are very 
>> literal, and very stupid. They will only do exactly what you tell them, so 
>> if something doesn't work as planned, you aren't telling them correctly.
>>
>> On Mon, Aug 20, 2018 at 11:32 AM John Clark > > wrote:
>>
>>>
>>>
>>> On 8/20/2018 12:24 PM, Thomas Keffer wrote:
>>>
>>> Nothing wrong with the Rapsberry Pi as a platform: thousands of WeeWX 
>>> users are using it successfully. However, you should reconsider your 
>>> decision to use MySQL if you are not familiar with it. It is much more 
>>> complex to administer then the default sqlite database.
>>>
>>> In any case, check the access permissions for user weewx. To do this, 
>>> run 'mysql' either as user weewx or user root. Then use the SHOW GRANTS 
>>> command:
>>>
>>> $ 
>>> *mysql -u root -p*
>>> mysql> 
>>> *SHOW GRANTS FOR 'weewx'@'localhost'; *
>>>
>>>
>>> $ mysql -u root -p **I get access denied**
>>> mysql> SHOW GRANTS FOR 'weewx'@'localhost'; **I get no results**
>>>
>>> Just for grins and giggles I set it to use sqlite and it did "run" but 
>>> there was nothing displayed with "localhost/weewx" just the "not 
>>> found"error and according to the syslog it wasn't uploading to my website
>>>
>>> *. *So, I am gonna give it a break before I use a hammer on it. THEN, 
>>> I'm not sure WHAT I'll do.
>>> -- 
>>> *John Clark *
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to weewx-user+...@googlegroups.com .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to weewx-user+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
>> *John Clark *
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to weewx-user+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Chronology

2018-08-20 Thread Les Niles
It is possible to reset the mysql root password as long as you have root access 
to the OS it’s running on.  (Yes, I know this for the obvious reason….)  There 
are a couple of ways to do this; here’s one: 
https://www.digitalocean.com/community/tutorials/how-to-reset-your-mysql-or-mariadb-root-password
 


  -Les


> On 20 Aug 2018, at 11:49, Thomas Keffer  wrote:
> 
> John,
> 
> Please don't summarize what you're finding. Cut-and-paste explicitly into the 
> email. For example, when you say '**I get access denied**' when trying to use 
> mysql, did it prompt for a password first (it should have)? You should have 
> given it the MySQL root password you used when setting up MySQL. If you don't 
> remember it, then you're stuck. Reinstall, and this time remember it.  
> Incidentally, this is a good example of how MySQL is more difficult to manage.
> 
> I don't know what you mean by anything in the "grins and giggles" paragraph. 
> What "not found" error? And, again, don't summarize what you think you're 
> seeing in syslog --- post it. 
> 
> Don't take these setbacks personally. The RPi is not out to get you. Give it 
> the right commands and it will do the right thing.
> 
> -tk
> 
> 
> On Mon, Aug 20, 2018 at 11:32 AM John Clark  > wrote:
> 
> 
> On 8/20/2018 12:24 PM, Thomas Keffer wrote:
>> Nothing wrong with the Rapsberry Pi as a platform: thousands of WeeWX users 
>> are using it successfully. However, you should reconsider your decision to 
>> use MySQL if you are not familiar with it. It is much more complex to 
>> administer then the default sqlite database.
>> 
>> In any case, check the access permissions for user weewx. To do this, run 
>> 'mysql' either as user weewx or user root. Then use the SHOW GRANTS command:
>> 
>> $ mysql -u root -p
>> mysql> SHOW GRANTS FOR 'weewx'@'localhost';
> 
> $ mysql -u root -p **I get access denied**
> mysql> SHOW GRANTS FOR 'weewx'@'localhost'; **I get no results**
> 
> Just for grins and giggles I set it to use sqlite and it did "run" but there 
> was nothing displayed with "localhost/weewx" just the "not found"error and 
> according to the syslog it wasn't uploading to my website.
> 
> So, I am gonna give it a break before I use a hammer on it. THEN, I'm not 
> sure WHAT I'll do.
> -- 
> John Clark 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to weewx-user+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to weewx-user+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Chronology

2018-08-20 Thread Thomas Keffer
John,

Please don't summarize what you're finding. Cut-and-paste explicitly into
the email. For example, when you say '**I get access denied**' when trying
to use mysql, did it prompt for a password first (it should have)? You
should have given it the MySQL root password you used when setting up
MySQL. If you don't remember it, then you're stuck. Reinstall, and this
time remember it.  Incidentally, this is a good example of how MySQL is
more difficult to manage.

I don't know what you mean by anything in the "grins and giggles"
paragraph. What "not found" error? And, again, don't summarize what you
think you're seeing in syslog --- post it.

Don't take these setbacks personally. The RPi is not out to get you. Give
it the right commands and it will do the right thing.

-tk


On Mon, Aug 20, 2018 at 11:32 AM John Clark  wrote:

>
>
> On 8/20/2018 12:24 PM, Thomas Keffer wrote:
>
> Nothing wrong with the Rapsberry Pi as a platform: thousands of WeeWX
> users are using it successfully. However, you should reconsider your
> decision to use MySQL if you are not familiar with it. It is much more
> complex to administer then the default sqlite database.
>
> In any case, check the access permissions for user weewx. To do this, run
> 'mysql' either as user weewx or user root. Then use the SHOW GRANTS command:
>
> $
> *mysql -u root -p*
> mysql>
> *SHOW GRANTS FOR 'weewx'@'localhost'; *
>
>
> $ mysql -u root -p **I get access denied**
> mysql> SHOW GRANTS FOR 'weewx'@'localhost'; **I get no results**
>
> Just for grins and giggles I set it to use sqlite and it did "run" but
> there was nothing displayed with "localhost/weewx" just the "not
> found"error and according to the syslog it wasn't uploading to my website
>
> *. *So, I am gonna give it a break before I use a hammer on it. THEN, I'm
> not sure WHAT I'll do.
> --
> *John Clark *
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Chronology

2018-08-20 Thread John Clark



On 8/20/2018 12:24 PM, Thomas Keffer wrote:
Nothing wrong with the Rapsberry Pi as a platform: thousands of WeeWX 
users are using it successfully. However, you should reconsider your 
decision to use MySQL if you are not familiar with it. It is much more 
complex to administer then the default sqlite database.


In any case, check the access permissions for user weewx. To do this, 
run 'mysql' either as user weewx or user root. Then use the SHOW 
GRANTS command:


$ *mysql -u root -p
*
mysql> *SHOW GRANTS FOR 'weewx'@'localhost';
*


$ mysql -u root -p **I get access denied**
mysql> SHOW GRANTS FOR 'weewx'@'localhost'; **I get no results**

Just for grins and giggles I set it to use sqlite and it did "run" but 
there was nothing displayed with "localhost/weewx" just the "not 
found"error and according to the syslog it wasn't uploading to my website*.


*So, I am gonna give it a break before I use a hammer on it. THEN, I'm 
not sure WHAT I'll do.*

***
--
*/John Clark /*

--
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Chronology

2018-08-20 Thread Thomas Keffer
Nothing wrong with the Rapsberry Pi as a platform: thousands of WeeWX users
are using it successfully. However, you should reconsider your decision to
use MySQL if you are not familiar with it. It is much more complex to
administer then the default sqlite database.

In any case, check the access permissions for user weewx. To do this, run
'mysql' either as user weewx or user root. Then use the SHOW GRANTS command:

$ *mysql -u root -p*
mysql> *SHOW GRANTS FOR 'weewx'@'localhost';*

The results should look something like:

+-+
| Grants for weewx@localhost
  |
+-+
| GRANT USAGE ON *.* TO 'weewx'@'localhost'
   |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `weewx`.* TO
'weewx'@'localhost'  |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `test`.* TO
'weewx'@'localhost'
 |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `test_dbd`.* TO
'weewx'@'localhost'   |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `test_sim`.* TO
'weewx'@'localhost'   |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `test_weewx`.* TO
'weewx'@'localhost' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `test_alt_weewx`.*
TO 'weewx'@'localhost' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `test_weedb`.* TO
'weewx'@'localhost' |
+-+
8 rows in set (0.00 sec)

(ignore the stuff for the 'test' users --- that's peculiar to my
environment.)

-tk



On Mon, Aug 20, 2018 at 9:57 AM John Clark  wrote:

> I decided to flush the SD and do a total reinstall. What follows id the 
> chronology
> *Downloaded weewx-3.8.2.tar.gz *
> *sudo apt-get install mc  Because it is so 
> handy**sudo apt-get install python**sudo apt-get install python-pil**sudo 
> apt-get install python-imaging**sudo apt-get install python-configobj**sudo 
> apt-get install python-cheetah**sudo apt-get install python-usb**sudo apt-get 
> install mysql-client**sudo apt-get install python-mysqldb**sudo apt-get 
> install ftp**sudo apt-get install python-dev**sudo apt-get install 
> python-pip**sudo pip install pyephem**sudo apt-get install apache2 **cd 
> Downloads**tar xvfz weewx-3.8.2.tar.gz**cd weewx-3.8.2**./setup.py 
> build**sudo ./setup.py install*
>
> Change, per instructions to use MySQL
> *mysql> CREATE USER 'weewx'@'localhost' IDENTIFIED BY 'weewx';**mysql> GRANT 
> select, update, create, delete, insert, drop ON weewx.* TO weewx@localhost 
> ;**sudo cp weewx/util/apache/conf.d/weewx.conf 
> /etc/apache2/conf.d**cd /home/weewx**sudo cp util/init.d/weewx.debian 
> /etc/init.d/weewx**sudo chmod +x /etc/init.d/weewx**sudo update-rc.d weewx 
> defaults 98*
>
> Started weewx and got syslog*
> Aug 20 10:49:48 raspberrypi weewx[5749]: engine: Loading service 
> weewx.wxservices.StdWXCalculate
> Aug 20 10:49:48 raspberrypi weewx[5749]: wxcalculate: The following values 
> will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, 
> dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, 
> windrun=prefer_hardware, heatindex=prefer_hardware, 
> maxSolarRad=prefer_hardware, humidex=prefer_hardware, 
> pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, 
> altimeter=prefer_hardware, cloudbase=prefer_hardware
> Aug 20 10:49:48 raspberrypi weewx[5749]: wxcalculate: The following 
> algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
> Aug 20 10:49:48 raspberrypi weewx[5749]: engine: Finished loading service 
> weewx.wxservices.StdWXCalculate
> Aug 20 10:49:48 raspberrypi weewx[5749]: engine: Loading service 
> weewx.engine.StdArchive
> Aug 20 10:49:48 raspberrypi weewx[5749]: engine: Archive will use data 
> binding wx_binding
> Aug 20 10:49:48 raspberrypi weewx[5749]: engine: Record generation will be 
> attempted in 'hardware'
> Aug* *20 10:49:48 raspberrypi weewx[5749]: engine: Using archive interval of 
> 300 seconds (specified in weewx configuration)
> Aug 20 10:49:48 raspberrypi weewx[5749]: engine: Use LOOP data in hi/low 
> calculations: 1
> Aug 20 10:49:48 raspberrypi weewx[5749]: engine: Database OperationalError 
> exception: (2002, 'Can\'t connect to local MySQL server through socket 
> \'/var/run/mysqld/mysqld.sock\' (2 "No such file or directory")')
> Aug 20 10:49:48 raspberrypi weewx[5749]:   Waiting 2 minutes then 
> retrying...*
>
>
> so I installed mysql-server
> *sudo apt-get install mysql-server*
>
> restarted weewx
> and got this error message
> *pi@raspberrypi:/home/weewx $ sudo tail **f /var/log/syslog
>
> Aug 20 10:55:51 raspberrypi weewx[7115]: File 
> "/home/weewx/bin/weewx/manager.py", line 127, in