Kann nicht auf phpMyAdmin verbinden

Begonnen von Arsène, 24 Februar 2015, 11:38:04

Vorheriges Thema - Nächstes Thema

Arsène

Hallo,

i wonder if i can connect my FHEM to phpmyadmin ?
Here's everything i've tried to do and i've always this message on DBlog's detail :

" STATE : waiting for connection "

So i did my db.conf like this :

%dbconfig= (
   connection => "mysql:database=fhem;host=192.168.10.182;port=3306",
   user => "fhemuser", (root)
   password => "fhempassword", (mypassword)
);

Did i need to add /phpmyadmin after the ip address? i don't think so but prefer to ask ^^

After have created my db "fhem" on phpmyadmin, i writed

        "define DbLog DbLog /etc/fhem/db.conf .*:.*" directly on FHEM

The way to the file was the good, but the connexion didn't want to do itself..
So i come to asking you if you see where's my mistake or what i forgot to do :)?

Grüsse

Arsène

Vertex

#1
Hi Arsène,

first of all did you check if mysql is running ?

sudo service mysql status

Second, have you already created the database "fhem" AND the tables?

"phpmyadmin" has nothing to do with mysql itself - it is just a comfortable web interface to manage a mysql database, but
you do not have to use it to set up dbLog for FHEM - it is more easy and safe to use the mysql console to set up the database.

Your db.conf looks fine to me.

I do not know if it is a problem, but you should not use the keyword "DbLog" as identifier (the first one). Even if it
does not harm your configuration, it is a very bad style and confusing.





Arsène

#2
Hi Vertex,

Here's the answer of my raspberry's console :

" Server version 5.5.41-0+whezyl
Protocol version 10
Connection Localhost via UNiX socket
UNix socket /var/run/mysqld/mysqld.sock
Uptime: 2 hours 46 min 38 sec

Threads: 1 questions: 541 Slow queries: 0 Opens : 216 Flush tables: 1 Open tables: 53 Queries per secnd avg : 0.054 "

Yes, the database and the two tables (current & history) have been created.

i know phpmyadmin isn't essential with mysql, but i need this interface cause i thins this the simplest way to manage my db.

Here's the screen of my FHEM DbLog :

(http://arsene-vauthier.com/fhem.JPG)

On my raspberry's console i'va this alert error :

" Can't call method "prepare" on an undefined valut at ./FHEM/93_DbLog.pm on line 1398 "

When i go on line 1398 there's this message :

" <li> An integer used to set the limit for the sql used for query 'getTableData' </li>"

i don't know realy what to do ^^


Grüsse

Arsène

Arsène

I've solved my problem ! I had let the Raspberry's IP instead of let localhost for the host, so the Raspberry didn't know where to connect itself ^^

Thanks for the advices and had a good day ;)