Installation of Zabbix in Centos 7
-
The Zabbix Installation page came in the browser after configuring the other things also
-
Can you check the Permissions of /var/lib/mysql ?
Make sure it is owned by mysql?
ls -ohrd /var/lib/mysql
-
The output for the above command is
drwxr-xr-x 5 mysql 4.0K Sep 9 01:57 /var/lib/mysql/ -
Then I have used this command as per teh Dafyre suggestion
ls -ohrd /var/lib/mysql/*thereare many files are present in it
-
Are they all owned by mysql or root or what?
-
@Lakshmana said:
Then I have used this command as per teh Dafyre suggestion
ls -ohrd /var/lib/mysql/*thereare many files are present in it
Always provide the output, not just your summary of what you feel you see.
-
@dafyre said:
It looks like he's using the right path now...
The error it is showing is that it can't create the tables... That seems like a MySQL error or something else. I'm not sure what to check next.
Turn off SELinux to be sure it is not blocking the creation of new database files.
-
the output of the command given below is provided here
ls -ohrd /var/lib/mysql/*[lakshmana@dny-lnx-zabbix ~]$ sudo ls -ohr /var/lib/mysql/*
srwxrwxrwx 1 mysql 0 Sep 9 01:57 /var/lib/mysql/mysql.sock
-rw-rw---- 1 mysql 5.0M Sep 9 08:28 /var/lib/mysql/ib_logfile1
-rw-rw---- 1 mysql 5.0M Sep 9 08:28 /var/lib/mysql/ib_logfile0
-rw-rw---- 1 mysql 26M Sep 9 08:28 /var/lib/mysql/ibdata1
-rw-rw---- 1 mysql 52 Sep 9 01:56 /var/lib/mysql/aria_log_control
-rw-rw---- 1 mysql 16K Sep 9 01:56 /var/lib/mysql/aria_log.00000001/var/lib/mysql/zabbixdb:
total 1.4M
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 valuemaps.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 usrgrp.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 users_groups.frm
-rw-rw---- 1 mysql 9.0K Sep 8 09:20 users.frm
-rw-rw---- 1 mysql 17K Sep 8 09:20 user_history.frm
-rw-rw---- 1 mysql 17K Sep 8 09:20 triggers.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 trigger_discovery.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 trigger_depends.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 trends_uint.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 trends.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 timeperiods.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 sysmap_url.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 sysmaps_link_triggers.frm
-rw-rw---- 1 mysql 13K Sep 8 09:20 sysmaps_links.frm
-rw-rw---- 1 mysql 14K Sep 8 09:20 sysmaps.frm
-rw-rw---- 1 mysql 18K Sep 8 09:20 sysmaps_elements.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 sysmap_element_url.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 slideshows.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 slides.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 sessions.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 services_times.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 services_links.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 services.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 service_alarms.frm
-rw-rw---- 1 mysql 13K Sep 8 09:20 scripts.frm
-rw-rw---- 1 mysql 9.1K Sep 8 09:20 screens_items.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 screens.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 rights.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 regexps.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 proxy_history.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 proxy_dhistory.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 proxy_autoreg_host.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 profiles.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 optemplate.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 opmessage_usr.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 opmessage_grp.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 opmessage.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 opgroup.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 operations.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 opconditions.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 opcommand_hst.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 opcommand_grp.frm
-rw-rw---- 1 mysql 8.8K Sep 8 09:20 opcommand.frm
-rw-rw---- 1 mysql 13K Sep 8 09:20 media_type.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 media.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 mappings.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 maintenances_windows.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 maintenances_hosts.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 maintenances_groups.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 maintenances.frm
-rw-rw---- 1 mysql 27K Sep 8 09:20 items.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 items_applications.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 item_discovery.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 item_condition.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 interface.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 interface_discovery.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 images.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 ids.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 icon_mapping.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 icon_map.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 httptestitem.frm
-rw-rw---- 1 mysql 14K Sep 8 09:20 httptest.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 httpstepitem.frm
-rw-rw---- 1 mysql 17K Sep 8 09:20 httpstep.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 housekeeper.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 hosts_templates.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 hosts_groups.frm
-rw-rw---- 1 mysql 14K Sep 8 09:20 hosts.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 hostmacro.frm
-rw-rw---- 1 mysql 28K Sep 8 09:20 host_inventory.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 host_discovery.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 history_uint.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 history_text.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 history_str.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 history_log.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 history.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 groups.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 group_prototype.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 group_discovery.frm
-rw-rw---- 1 mysql 9.1K Sep 8 09:20 graph_theme.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 graphs_items.frm
-rw-rw---- 1 mysql 9.1K Sep 8 09:20 graphs.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 graph_discovery.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 globalvars.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 globalmacro.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 functions.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 expressions.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 events.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 escalations.frm
-rw-rw---- 1 mysql 8.8K Sep 8 09:20 dservices.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 drules.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 dhosts.frm
-rw-rw---- 1 mysql 13K Sep 8 09:20 dchecks.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 dbversion.frm
-rw-rw---- 1 mysql 61 Sep 7 14:21 db.opt
-rw-rw---- 1 mysql 16K Sep 8 09:20 config.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 conditions.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 autoreg_host.frm
-rw-rw---- 1 mysql 8.7K Sep 8 09:20 auditlog.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 auditlog_details.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 application_template.frm
-rw-rw---- 1 mysql 8.5K Sep 8 09:20 applications.frm
-rw-rw---- 1 mysql 13K Sep 8 09:20 alerts.frm
-rw-rw---- 1 mysql 13K Sep 8 09:20 actions.frm
-rw-rw---- 1 mysql 8.6K Sep 8 09:20 acknowledges.frm/var/lib/mysql/performance_schema:
total 208K
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 threads.frm
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 setup_timers.frm
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 setup_instruments.frm
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 setup_consumers.frm
-rw-rw---- 1 mysql 8.6K Sep 7 13:23 rwlock_instances.frm
-rw-rw---- 1 mysql 8.6K Sep 7 13:23 performance_timers.frm
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 mutex_instances.frm
-rw-rw---- 1 mysql 8.7K Sep 7 13:23 file_summary_by_instance.frm
-rw-rw---- 1 mysql 8.6K Sep 7 13:23 file_summary_by_event_name.frm
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 file_instances.frm
-rw-rw---- 1 mysql 8.7K Sep 7 13:23 events_waits_summary_global_by_event_name.frm
-rw-rw---- 1 mysql 8.7K Sep 7 13:23 events_waits_summary_by_thread_by_event_name.frm
-rw-rw---- 1 mysql 8.7K Sep 7 13:23 events_waits_summary_by_instance.frm
-rw-rw---- 1 mysql 9.1K Sep 7 13:23 events_waits_history_long.frm
-rw-rw---- 1 mysql 9.1K Sep 7 13:23 events_waits_history.frm
-rw-rw---- 1 mysql 9.1K Sep 7 13:23 events_waits_current.frm
-rw-rw---- 1 mysql 61 Sep 7 13:23 db.opt
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 cond_instances.frm/var/lib/mysql/mysql:
total 1000K
-rw-rw---- 1 mysql 2.0K Sep 9 01:56 user.MYI
-rw-rw---- 1 mysql 532 Sep 8 06:18 user.MYD
-rw-rw---- 1 mysql 11K Sep 7 13:23 user.frm
-rw-rw---- 1 mysql 1.0K Sep 7 13:23 time_zone_transition_type.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 time_zone_transition_type.MYD
-rw-rw---- 1 mysql 8.6K Sep 7 13:23 time_zone_transition_type.frm
-rw-rw---- 1 mysql 1.0K Sep 7 13:23 time_zone_transition.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 time_zone_transition.MYD
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 time_zone_transition.frm
-rw-rw---- 1 mysql 1.0K Sep 7 13:23 time_zone_name.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 time_zone_name.MYD
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 time_zone_name.frm
-rw-rw---- 1 mysql 1.0K Sep 7 13:23 time_zone.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 time_zone.MYD
-rw-rw---- 1 mysql 1.0K Sep 7 13:23 time_zone_leap_second.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 time_zone_leap_second.MYD
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 time_zone_leap_second.frm
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 time_zone.frm
-rw-rw---- 1 mysql 4.0K Sep 7 13:23 tables_priv.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 tables_priv.MYD
-rw-rw---- 1 mysql 8.8K Sep 7 13:23 tables_priv.frm
-rw-rw---- 1 mysql 8.8K Sep 7 13:23 slow_log.frm
-rw-rw---- 1 mysql 0 Sep 7 13:23 slow_log.CSV
-rw-rw---- 1 mysql 35 Sep 9 01:56 slow_log.CSM
-rw-rw---- 1 mysql 1.0K Sep 7 13:23 servers.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 servers.MYD
-rw-rw---- 1 mysql 8.7K Sep 7 13:23 servers.frm
-rw-rw---- 1 mysql 5.0K Sep 7 13:23 proxies_priv.MYI
-rw-rw---- 1 mysql 1.4K Sep 7 13:23 proxies_priv.MYD
-rw-rw---- 1 mysql 8.6K Sep 7 13:23 proxies_priv.frm
-rw-rw---- 1 mysql 4.0K Sep 7 13:23 procs_priv.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 procs_priv.MYD
-rw-rw---- 1 mysql 8.7K Sep 7 13:23 procs_priv.frm
-rw-rw---- 1 mysql 4.0K Sep 7 13:23 proc.MYI
-rw-rw---- 1 mysql 292 Sep 7 13:23 proc.MYD
-rw-rw---- 1 mysql 9.8K Sep 7 13:23 proc.frm
-rw-rw---- 1 mysql 1.0K Sep 7 13:23 plugin.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 plugin.MYD
-rw-rw---- 1 mysql 8.4K Sep 7 13:23 plugin.frm
-rw-rw---- 1 mysql 1.0K Sep 7 13:23 ndb_binlog_index.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 ndb_binlog_index.MYD
-rw-rw---- 1 mysql 8.6K Sep 7 13:23 ndb_binlog_index.frm
-rw-rw---- 1 mysql 2.0K Sep 7 13:23 host.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 host.MYD
-rw-rw---- 1 mysql 9.3K Sep 7 13:23 host.frm
-rw-rw---- 1 mysql 20K Sep 7 13:23 help_topic.MYI
-rw-rw---- 1 mysql 440K Sep 7 13:23 help_topic.MYD
-rw-rw---- 1 mysql 8.6K Sep 7 13:23 help_topic.frm
-rw-rw---- 1 mysql 19K Sep 7 13:23 help_relation.MYI
-rw-rw---- 1 mysql 9.1K Sep 7 13:23 help_relation.MYD
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 help_relation.frm
-rw-rw---- 1 mysql 16K Sep 7 13:23 help_keyword.MYI
-rw-rw---- 1 mysql 90K Sep 7 13:23 help_keyword.MYD
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 help_keyword.frm
-rw-rw---- 1 mysql 3.0K Sep 7 13:23 help_category.MYI
-rw-rw---- 1 mysql 1.1K Sep 7 13:23 help_category.MYD
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 help_category.frm
-rw-rw---- 1 mysql 8.6K Sep 7 13:23 general_log.frm
-rw-rw---- 1 mysql 0 Sep 7 13:23 general_log.CSV
-rw-rw---- 1 mysql 35 Sep 9 01:56 general_log.CSM
-rw-rw---- 1 mysql 1.0K Sep 7 13:23 func.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 func.MYD
-rw-rw---- 1 mysql 8.5K Sep 7 13:23 func.frm
-rw-rw---- 1 mysql 2.0K Sep 7 13:23 event.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 event.MYD
-rw-rw---- 1 mysql 10K Sep 7 13:23 event.frm
-rw-rw---- 1 mysql 5.0K Sep 9 01:56 db.MYI
-rw-rw---- 1 mysql 880 Sep 7 14:21 db.MYD
-rw-rw---- 1 mysql 9.4K Sep 7 13:23 db.frm
-rw-rw---- 1 mysql 4.0K Sep 7 13:23 columns_priv.MYI
-rw-rw---- 1 mysql 0 Sep 7 13:23 columns_priv.MYD
-rw-rw---- 1 mysql 8.7K Sep 7 13:23 columns_priv.frm
[lakshmana@dny-lnx-zabbix ~]$ -
Looks healthy from a permissions standpoint.
-
[lakshmana@dny-lnx-zabbix ~]$ sestatus -v
SELinux status: disabled
[lakshmana@dny-lnx-zabbix ~]$ -
Okay, so SELinux is off.
-
Curious... It looks like all the tables are there now.
What happens if you:
mysql -u root -p
use zabbixdb;
describe users;?
-
The output is provided below
[lakshmana@dny-lnx-zabbix ~]$ sudo mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 423
Server version: 5.5.44-MariaDB MariaDB ServerCopyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> use zabbixdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
MariaDB [zabbixdb]> describe users;
+----------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------------+------+-----+---------+-------+
| userid | bigint(20) unsigned | NO | PRI | NULL | |
| alias | varchar(100) | NO | UNI | | |
| name | varchar(100) | NO | | | |
| surname | varchar(100) | NO | | | |
| passwd | char(32) | NO | | | |
| url | varchar(255) | NO | | | |
| autologin | int(11) | NO | | 0 | |
| autologout | int(11) | NO | | 900 | |
| lang | varchar(5) | NO | | en_GB | |
| refresh | int(11) | NO | | 30 | |
| type | int(11) | NO | | 1 | |
| theme | varchar(128) | NO | | default | |
| attempt_failed | int(11) | NO | | 0 | |
| attempt_ip | varchar(39) | NO | | | |
| attempt_clock | int(11) | NO | | 0 | |
| rows_per_page | int(11) | NO | | 50 | |
+----------------+---------------------+------+-----+---------+-------+
16 rows in set (0.00 sec) -
Okay... now...
select userid,name from users;
-
MariaDB [zabbixdb]> select userid,name from users;
+--------+--------+
| userid | name |
+--------+--------+
| 1 | Zabbix |
| 2 | |
+--------+--------+
2 rows in set (0.00 sec) -
It looks like the data has loaded right... let's check one more...
select imageid,imagetype,name from images limit 10;
-
The output is given below
MariaDB [zabbixdb]> select imageid,imagetype,name from images limit 10;
+---------+-----------+---------------------+
| imageid | imagetype | name |
+---------+-----------+---------------------+
| 1 | 1 | Cloud_(128) |
| 2 | 1 | Cloud_(24) |
| 3 | 1 | Cloud_(48) |
| 4 | 1 | Cloud_(64) |
| 5 | 1 | Cloud_(96) |
| 6 | 1 | Crypto-router_(128) |
| 7 | 1 | Crypto-router_(24) |
| 8 | 1 | Crypto-router_(48) |
| 9 | 1 | Crypto-router_(64) |
| 10 | 1 | Crypto-router_(96) |
+---------+-----------+---------------------+ -
Okay, so everything appears to be working.
What happens if you http://<ip of your server>/zabbix ?
-
The zabbix installation page comes
-
Ah, okay, that is good, then. 8-)
Go through the installation process one step at a time. Send a screenshot if you get any errors.