0
votes

I have a strange problem with my RPi. I'm trying to make a Weather Station on Raspbian. Here's what I did:

And now the best part: in this moment everything's just fine - I can send temperature, pressure etc. to the database. But I also want to have RTC on my breadboard, because the Weather Station should also work offline and I need a proper time for measurements. So I do:

https://www.abelectronics.co.uk/rtcpi-raspberrypi-tutorial/info.aspx

...and my problems begin. After reboot RPi works extremely slow (~5 minutes to turn on), ssh (via Putty) works horrible (actually, sometimes it doesn't work at all, just "connection refused") and for some reason MySQL is messed up. It gaves me error "can't connect through socket" (similar to Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (38)).

I can run it by typing "service mysql start", but I want it to work on autostart. I tried everything: reinstall of mysql, updates, upgrades (building "apt-get" dependency tree takes about 30 minutes!), even install Raspbian from the beginning.

1
Sorry, I meant "dependency tree" of course.Krzysztof Buczak
So this boils down to MySQL not starting on boot? Have you verified that it's configured to start on boot with initctl? Have you looked through the logs for clues?Tore Olsen
Yes, I did that. Logs are empty (even after changing their permission to "777"). It might sound ridiculous, but...Krzysztof Buczak
sorry, I accidentally pressed enter :) Part 2 of my comment: [...]but...now everything works. Sometimes I have to restart RPi because building dependency tree is slow, but I don't know how Raspbian repaired itself, so I don't know if the problem might me considered as solved :D Anyway, I'll inform you about situation.Krzysztof Buczak

1 Answers

0
votes

OK, I solved my problem.

It was caused by Apache 2. I used to use only Putty via SSG, so I couldn't see system messages when Raspbian was starting. When I connected RPi to my TV, I noticed that something's wrong with Apache - "Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName". Then MySQL crashed as well and RPi was working very slow.

Here's the solution:

http://aslamnajeebdeen.com/blog/how-to-fix-apache-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127011-for-servername-error-on-ubuntu

Just follow the "main" instruction and instructions from 2 top comments. It worked for me, no more MySQL or Apache problems.