Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Aug 21, 2017 6:50 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Import DB error
PostPosted: Thu Feb 02, 2017 3:19 pm 
Offline

Joined: Thu Feb 02, 2017 3:09 pm
Posts: 3
Hello,

I'm getting the following error when I'm trying to import the default cacti database:

ERROR 1071 (42000) at line 2560: Specified key was too long; max key length is 767 bytes

I'm running MariaDB 10.0, and am not quite sure how to get around this issue.

Craig


Top
 Profile  
 
 Post subject: Re: Import DB error
PostPosted: Fri Feb 10, 2017 11:00 pm 
Offline

Joined: Fri Feb 10, 2017 10:58 pm
Posts: 2
same thing here running
Arch Linux
mysql Ver 15.1 Distrib 10.1.21-MariaDB, for Linux (x86_64) using readline 5.1


ERROR 1071 (42000) at line 2560: Specified key was too long; max key length is 767 bytes


Top
 Profile  
 
 Post subject: Re: Import DB error
PostPosted: Fri Feb 10, 2017 11:45 pm 
Offline

Joined: Fri Feb 10, 2017 10:58 pm
Posts: 2
update : use utf8 instead of utf8mb4


Top
 Profile  
 
 Post subject: Re: Import DB error
PostPosted: Fri Mar 03, 2017 8:59 pm 
Offline
Cacti User

Joined: Mon Nov 08, 2004 12:11 am
Posts: 59
vas wrote:
update : use utf8 instead of utf8mb4


UPDATE: I tried to clean up their database template so that it could be imported, but gave up. The Cacti devs though it would be a great idea to make everything an index/key. They are going to have a fun time converting their database some day.

Best thing to do is to set the database creation command with the right values. Don't set your global configuration with "utf8":

echo "create database cacti DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;" | sudo mysql -u root -p

--

The MariaDB/MySQL "uf8" character set is a dirty bastard 3-byte proprietary half-assed implementation of utf8 that should have been aborted by means of violence by the idiots who conceived it.

That's what "utf8mb4" is. It's "real" UTF8 according to accepted standards.

Once you import and create those DBs, you will have to later convert ALL your databases to "real" UTF8, and that will be very painful for you. Don't do it.


Top
 Profile  
 
 Post subject: Re: Import DB error
PostPosted: Sat Mar 04, 2017 10:49 pm 
Offline
Cacti User

Joined: Mon Nov 08, 2004 12:11 am
Posts: 59
https:[email protected]/in-mysql ... 761243e434


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group