Ad Widget

Collapse

MySQL database without password

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmj
    Junior Member
    • Jan 2010
    • 6

    #1

    MySQL database without password

    I have installed Zabbix 1.8 on Fedora 8 server, brand new installation of Zabbix on a brand new installation of Fedora.

    To build the MySQL DB I used following commands ( as root)

    mysql> create database zabbix character set utf8;

    [root@nocu05 schema]# cat mysql.sql | mysql zabbix
    [root@nocu05 schema]# cd ../data
    [root@nocu05 data]# cat data.sql | mysql zabbix
    [root@nocu05 data]# cat images_mysql.sql | mysql zabbix


    The DB user and grants looks like :
    mysql> select userid,alias,name,surname,passwd from users;
    +--------+-------+---------+---------------+----------------------------------+
    | userid | alias | name | surname | passwd |
    +--------+-------+---------+---------------+----------------------------------+
    | 1 | Admin | Zabbix | Administrator | blablabla
    | 2 | guest | Default | User | blablanla |
    +--------+-------+---------+---------------+----------------------------------+
    2 rows in set (0.00 sec)

    mysql> show grants ;
    +---------------------------------------------------------------------+
    | Grants for root@localhost |
    +---------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
    | GRANT ALL PRIVILEGES ON `zabbix`.* TO 'root'@'localhost' |
    +---------------------------------------------------------------------+
    2 rows in set (0.01 sec)

    I am finishing the installation, on point 4 in the WEB installation I can declare a Database without password :

    Type MySQL
    Host localhost
    Port 0 - use default port
    Name zabbix
    User root
    Password

    Ok

    The test connection tells me its OK,

    zabbix.conf.php looks like :
    global $DB;

    $DB["TYPE"] = "MYSQL";
    $DB["SERVER"] = "localhost";
    $DB["PORT"] = "0";
    $DB["DATABASE"] = "zabbix";
    $DB["USER"] = "root";
    $DB["PASSWORD"] = "";
    $ZBX_SERVER = "localhost";
    $ZBX_SERVER_PORT = "10051";


    $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;

    But when I the try to login i I get following error message "ERROR: Login name or password is incorrect"


    Comenting $DB["PASSWORD"] in zabbix.conf.php ( #$DB["PASSWORD"]) does not help.
    Should I see root in the DB users table ?

    I am since more than 1 day on the problem. Any help is welcome
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    hmm. and what username and password did you try to use ?
    did you try ones mentioned in the manual - admin/zabbix ?
    Zabbix 3.0 Network Monitoring book

    Comment

    • jmj
      Junior Member
      • Jan 2010
      • 6

      #3
      Well, in fact I tried desesperately to grant access and/or enable login to root/root-password or zabbix/zabix-user-password until a colleague told me that admin/zabbix works fine.
      I must have skipped this information in the manual.

      Thanks anyhow.

      Best regards

      Jean-Marc

      Comment

      Working...