Netjukebox 1071 error on startup

Linux related discussion about netjukebox
Post Reply
BobRathbone
User
Posts: 1
Joined: Mon Mar 19, 2018 5:17 pm

Netjukebox 1071 error on startup

Post by BobRathbone » Mon Mar 19, 2018 5:30 pm

I am currently installing netjukebox on a Rasberry Pi running Raspbian Stretch with MPD.
Apache2 with PHP7 is installed.

When I start netjukebox the following is displayed:

MySQL create/upgarde error
File:/var/www/html/netjukebox/sql/netjukebox_57.sql
Query: -- -- Indexes for table `server` -- ALTER TABLE `server` ADD PRIMARY KEY (`name`)

MariaDB [netjukebox]> desc server;

Code: Select all

+------------+--------------+------+-----+---------+-------+
| Field      | Type         | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| name       | varchar(255) | NO   |     |         |       |
| value      | varchar(255) | NO   |     |         |       |
| is_integer | tinyint(1)   | NO   |     | 0       |       |
+------------+--------------+------+-----+---------+-------+
3 rows in set (0.00 sec)

I tried running the SQL command from netjukebox_57.sql but get a 1071 error:

MariaDB [netjukebox]> ALTER TABLE `server` ADD PRIMARY KEY (`name`);
ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

My apologies if this is already handled in the forum but I was unable to find a solution.
Any help would be appreciated.

Regards
Bob Rathbone

User avatar
wbartels
netjukebox developer
Posts: 799
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Netjukebox 1071 error on startup

Post by wbartels » Thu Mar 22, 2018 2:30 pm

I found the problem and come back shortly with an update.
https://stackoverflow.com/questions/874 ... 1000-bytes

User avatar
wbartels
netjukebox developer
Posts: 799
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Netjukebox 1071 error on startup

Post by wbartels » Sun Mar 25, 2018 12:12 pm

Hello RobRathbone,

I could reproduce your problem when set the database character set to utf8mb4.
For example the index for `artist` varchar(255) gets to long:
255 characters x 4 bytes > 1000

The problem should be fixed in netjukebox 6.40.
Please let me know if this also worked for you?

Thank,
Willem

Post Reply