Search code examples
mysqlapachepostgresqlubuntu-14.04zabbix

MySQL does not display during setup of Zabbix


I have issue during Zabbix 2.4-1 installation on ubuntu 14.04. I used manual from official site, installation was successful, no errors. Next I created user 'zabbix' with all privileges and database 'zabbix' and imported schema.sql, images.sql and data.sql from Zabbix archive. Then I changed configuration files in /etc/zabbix dir:

zabbix.conf.php

// Zabbix GUI configuration file
global $DB;

// Valid types are MYSQL, SQLITE3 or POSTGRESQL
$DB["TYPE"] = 'MYSQL';
$DB["SERVER"] = 'localhost';
$DB["PORT"] = '3306';

// SQLITE3 use full path to file/database: $DB["DATABASE"] = '/var/lib/zabbix/zabbix.sqlite3';
$DB["DATABASE"] = 'zabbix';
$DB["USER"] = 'zabbix';
$DB["PASSWORD"] = 'root';
// SCHEMA is relevant only for IBM_DB2 database
$DB["SCHEMA"] = '';

$ZBX_SERVER = 'localhost';
$ZBX_SERVER_PORT = '10051';
$ZBX_SERVER_NAME = '';

$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;

zabbix-server-mysql.conf

...
# dbc_dbtype: type of underlying database to use
# this exists primarily to let dbconfig-common know what database
# type to use when a package supports multiple database types.
# don't change this value unless you know for certain that this
# package supports multiple database types
dbc_dbtype='mysql'

# dbc_dbuser: database user
# the name of the user who we will use to connect to the database.
dbc_dbuser='zabbix'

# dbc_dbpass: database user password
# the password to use with the above username when connecting
# to a database, if one is required
dbc_dbpass='root'
...

I start it with apache server. When I go to localhost/zabbix I see Zabbix Installer. On step 3 it's necessary to configure DB connection. So, here is a problem:

Trouble

As you see, in select list is only PostgreSQL, so, I can't connect to database (mysql server is running) and go to the next step.


Solution

  • Your PHP doesn't support MySQL at the moment. You need to install some php-mysql* package and then restart your webserver.