Menu

#294 High CPU usage by mysqld in phpipam

version 0.8
open
nobody
None
1
2019-03-04
2019-03-04
Anonymous
No

Hi

Referring to the case : https://sourceforge.net/p/phpipam/support-requests/253/

To resolve when "ALTER TABLE ipaddresses ADD INDEX (subnetId);" is given, it shows the below error:

mysql> ALTER TABLE ipaddresses ADD INDEX (subnetId);
ERROR 1170 (42000): BLOB/TEXT column 'subnetId' used in key specification without a key length

This is the output of SHOW CREATE TABLE ipaddresses ;

===============================================
+-------------+----------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --------------+
| Table | Create Table |
+-------------+----------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --------------+
| ipaddresses | CREATE TABLE ipaddresses (
id int(11) NOT NULL AUTO_INCREMENT,
subnetId text NOT NULL,
ip_addr varchar(100) NOT NULL,
description varchar(64) DEFAULT NULL,
dns_name varchar(64) NOT NULL,
mac varchar(20) DEFAULT NULL,
owner varchar(32) DEFAULT NULL,
state varchar(1) DEFAULT '1',
switch varchar(32) DEFAULT NULL,
port varchar(32) DEFAULT NULL,
note text,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=9925 DEFAULT CHARSET=utf8 |
+-------------+----------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --------------+
1 row in set (0.00 sec)

===============================================

Could you please check and suggest a solution for this?

Thanks.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.