Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support WebConsole not connecting to MySql db

  • WebConsole not connecting to MySql db

    Posted by kram on May 9, 2007 at 23:58

    Hi,
    I followed the instruction mentioned in the installation guide to install and configure pandora server and pandora webconsole.
    Now when I tried connecting to the webconsole through Apache on my web browser window. I am able to see all the subdirectories under the folder pandora_console. Which proves that Apache server is running fine.
    But when I try opening the index.php file inside the pandora_console folder:
    It gives me an error saying:
    Pandora Console Error DB-001
    Cannot connect with Database, please check your database setup in the ./include/config.php file and read documentation.
    Probably any of your user/database/hostname values are incorrect or database is not running.
    MySQL ERROR: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)

    Can anyone please suggest me a way to solve this issue? Thanks in advance!

    raul replied 17 years, 9 months ago 4 Members · 7 Replies
  • 7 Replies
  • sillyPandora

    Member
    May 10, 2007 at 00:45
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Can you mannually log into MySQL pandora database?
    Are all the packages installed?

  • kram

    Member
    May 10, 2007 at 01:20
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Thanks for the quick reply!
    I was going through a help website on this same issue. It asked me to add my.cnf file in the /etc folder and add a line about the location of the socket. I did that. And ever since I did that I am not able to get access to mysql manually. I tried logging in manually after deleting that file and still the same error comes up:
    ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

    But, even when I was able to connect manually(before I added the my.cnf file), I was not able to connect to the mysql db through pandora webconsole.

    About your second question , I have installed all the required components like:
    Apache, PHP, mysql, Pandora Server. I have followed the exact same steps mentioned in the install doc, and have not even changed the default username(pandora) and password(pandora) mentioned there.

    Do let me know if I need to troubleshoot something else. Thanks in advance.

  • kram

    Member
    May 10, 2007 at 01:53
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    A small correction from my previous post.
    After deleting my.cnf from the /etc folder and restarting the system, I am able to manually connect to mysql using my default username(pandora) and password(pandora).

    Do let me know if there is some way to troubleshoot this issue. Thanks in advance!

  • manu

    Member
    May 10, 2007 at 11:14
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I know it’s an obvius question, but…did you take a look at the include/config.php of the webconsole? Is it ok? What about its perms?

  • kram

    Member
    May 10, 2007 at 16:59
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Yes I did. I checked perms set in that aswell(which is default).
    dbname=pandora
    dbuser=pandora
    dbpassword=pandora
    dbhost=localhost
    dbtype=mysql

    Do let me know if there is anything else I have to look at. Thanks in advance!

  • manu

    Member
    May 10, 2007 at 18:40
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    What happens if you…

    mysql -D pandora -u root -p

    Everything works fine from the CLI?

  • raul

    Member
    May 10, 2007 at 19:24
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Please check the permissions on /var/lib/mysql.

    Try to change the permissions to 755 and check if it works.