Netjukebox 1071 error on startup

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

Netjukebox 1071 error on startup

Post by BobRathbone »

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: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Netjukebox 1071 error on startup

Post by wbartels »

I found the problem and come back shortly with an update.
https://stackoverflow.com/questions/874 ... 1000-bytes
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Re: Netjukebox 1071 error on startup

Post by wbartels »

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
Locked