Discussion:
zenoss core 4 - ERROR 1146 (42S02) at line 5: Table 'mysql.servers' doesn't exist
amitk
2012-04-27 13:27:53 UTC
Permalink
amitk [http://community.zenoss.org/people/amitk] created the discussion

"zenoss core 4 - ERROR 1146 (42S02) at line 5: Table 'mysql.servers' doesn't exist"

To view the discussion, visit: http://community.zenoss.org/message/66115#66115

--------------------------------------------------------------
Hi,

I tried to install core 4 which gave me following error. I checked the mysql database and I don't see events database.
what's wrong here?

Thanks,
Amit


[***@testwks1 ~]# rpm -ivh ~kshirsaa/zenoss-4.1.70-1482.el5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:zenoss                 ########################################### [100%]
grep: /home/zenoss/.bashrc: No such file or directory
[***@testwks1 ~]#
[***@testwks1 ~]#
[***@testwks1 ~]#
[***@testwks1 ~]# service zenoss start
Zenoss not initialized.  Performing first-boot initialization...
Fresh install pre steps
Stopping snmpd:                                            [  OK  ]
Starting snmpd:                                            [  OK  ]
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
ERROR 1146 (42S02) at line 5: Table 'mysql.servers' doesn't exist
Dropping database: zodb_session
Creating database: zodb_session
Failed to create ZODB session database

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
| zodb_session       |
+--------------------+
4 rows in set (0.00 sec)


mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A


Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| func                      |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| proc                      |
| procs_priv                |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/66115#66115]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2012-04-27 15:34:27 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: zenoss core 4 - ERROR 1146 (42S02) at line 5: Table 'mysql.servers' doesn't exist"

To view the discussion, visit: http://community.zenoss.org/message/66132#66132

--------------------------------------------------------------
was your mysql root password blank when did the install?

This kinda seems like an in issue with mysql independant of Zenoss (maybe): http://forums.mysql.com/read.php?11,142598,142598 http://forums.mysql.com/read.php?11,142598,142598
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/66132#66132]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
amitk
2012-04-27 17:51:25 UTC
Permalink
amitk [http://community.zenoss.org/people/amitk] created the discussion

"Re: zenoss core 4 - ERROR 1146 (42S02) at line 5: Table 'mysql.servers' doesn't exist"

To view the discussion, visit: http://community.zenoss.org/message/66133#66133

--------------------------------------------------------------
Thanks! I did following which fixed the issue. Zenoss Core 4 is up and running now :)



mysql> FLUSH PRIVILEGES ;
ERROR 1146 (42S02): Table 'mysql.servers' doesn't exist
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A


Database changed
mysql> CREATE TABLE `servers` (
    -> `Server_name` CHAR(64) NOT NULL,
    -> `Host` CHAR(64) NOT NULL,
    -> `Db` CHAR(64) NOT NULL,
    -> `Username` CHAR(64) NOT NULL,
    -> `Password` CHAR(64) NOT NULL,
    -> `Port` INT(4) DEFAULT NULL,
    -> `Socket` CHAR(64) DEFAULT NULL,
    -> `Wrapper` CHAR(64) NOT NULL,
    -> `Owner` CHAR(64) NOT NULL,
    -> PRIMARY KEY (`Server_name`)
    -> ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';


Query OK, 0 rows affected (0.01 sec)


mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| func                      |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| proc                      |
| procs_priv                |
| servers                   |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
18 rows in set (0.00 sec)


mysql> describe servers;
+-------------+----------+------+-----+---------+-------+
| Field       | Type     | Null | Key | Default | Extra |
+-------------+----------+------+-----+---------+-------+
| Server_name | char(64) | NO   | PRI | NULL    |       |
| Host        | char(64) | NO   |     | NULL    |       |
| Db          | char(64) | NO   |     | NULL    |       |
| Username    | char(64) | NO   |     | NULL    |       |
| Password    | char(64) | NO   |     | NULL    |       |
| Port        | int(4)   | YES  |     | NULL    |       |
| Socket      | char(64) | YES  |     | NULL    |       |
| Wrapper     | char(64) | NO   |     | NULL    |       |
| Owner       | char(64) | NO   |     | NULL    |       |
+-------------+----------+------+-----+---------+-------+
9 rows in set (0.00 sec)


mysql>
mysql> Bye


[***@testwks1 ~]# rpm -ivh ~kshirsaa/zenoss-4.1.70-1482.el5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:zenoss                 ########################################### [100%]


[***@testwks1 ~]# service zenoss start
Zenoss not initialized.  Performing first-boot initialization...
Fresh install pre steps
Stopping snmpd:                                            [  OK  ]
Starting snmpd:                                            [  OK  ]
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
ERROR 1558 (HY000) at line 6 in file: '/opt/zenoss/Products/ZenUtils/relstorage/mysql/001.sql': Column count of mysql.proc is wrong. Expected 20, found 16. Created with MySQL 50077, now running 50523. Please use mysql_upgrade to fix this error.
Dropping database: zodb_session
Creating database: zodb_session
Applying schema version: 1
Failed to create ZODB session database


[***@testwks1 ~]# mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
Running 'mysqlcheck with default connection arguments
mysqlcheck: Unknown OS character set 'ISO-8859-15'.
mysqlcheck: Switching to the default character set 'latin1'.
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.func                                         OK
mysql.help_category
error    : Table upgrade required. Please do "REPAIR TABLE `help_category`" or dump/reload to fix it!
mysql.help_keyword
error    : Table upgrade required. Please do "REPAIR TABLE `help_keyword`" or dump/reload to fix it!
mysql.help_relation                                OK
mysql.help_topic
error    : Table upgrade required. Please do "REPAIR TABLE `help_topic`" or dump/reload to fix it!
mysql.host                                         OK
mysql.proc
error    : Table upgrade required. Please do "REPAIR TABLE `proc`" or dump/reload to fix it!
mysql.procs_priv                                   OK
mysql.servers                                      OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name
error    : Table upgrade required. Please do "REPAIR TABLE `time_zone_name`" or dump/reload to fix it!
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK


Repairing tables
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_topic                                   OK
mysql.proc                                         OK
mysql.time_zone_name                               OK
Running 'mysql_fix_privilege_tables'...
OK


[***@testwks1 ~]# service zenoss start
Zenoss not initialized.  Performing first-boot initialization...
Fresh install pre steps
Stopping snmpd:                                            [  OK  ]
Starting snmpd:                                            [  OK  ]
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
Dropping database: zodb_session
Creating database: zodb_session
Applying schema version: 1
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
Dropping database: zodb
Creating database: zodb
Applying schema version: 1
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
mysql: Unknown OS character set 'ISO-8859-15'.
mysql: Switching to the default character set 'latin1'.
Creating database: zenoss_zep
Applying schema version: 1
Applying schema version: 2
Applying schema version: 3
Applying schema version: 4
make zope instance.
Loading initial Zenoss objects into the Zeo database
(this can take a few minutes)
Zenoss initialization complete.
Daemon: zeneventserver starting...
Waiting for zeneventserver to start........
Daemon: zopectl .
daemon process started, pid=29010
Daemon: zenhub starting...
Daemon: zenjobs starting...
Daemon: zeneventd starting...
Daemon: zenping starting...
Daemon: zensyslog starting...
Daemon: zenstatus starting...
Daemon: zenactiond starting...
Daemon: zentrap starting...
Daemon: zenmodeler starting...
Daemon: zenperfsnmp starting...
Daemon: zencommand starting...
Daemon: zenprocess starting...
Daemon: zenrrdcached starting...


Fresh install post step
--2012-04-28 15:51:06--  http://testwks1.hyd.desres.deshaw.com:8080/zport/dmd/DeviceLoader/loadDevice?deviceName=testwks1.hyd.desres.deshaw.com&devicePath=/Server/Linux http://testwks1.hyd.desres.deshaw.com:8080/zport/dmd/DeviceLoader/loadDevice?deviceName=testwks1.hyd.desres.deshaw.com&devicePath=/Server/Linux
Resolving testwks1.hyd.desres.deshaw.com... 10.240.168.207
Connecting to testwks1.hyd.desres.deshaw.com|10.240.168.207|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/dev/null'


     0K .......... .....                                       1.56K=10s


2012-04-28 15:51:17 (1.56 KB/s) - `/dev/null' saved [16309]


Zenoss installation completed.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/66133#66133]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...