Can't get MySQL Working - Table 'tracks' already exists (1050)

phs

Member
Hi all,
So I've installed the latest RB release (5.8.1.0) to test the new MySQL feature, but I can't get it working.

I have a server running MariaDB 10.3.11 on CentOS 7 on the same local network as the RadioBoss PC. I configure RB to connect to the host, and the 'Test' button tells me "Connection Successful", however after restarting RadioBoss:
  • After a few seconds I get "No Database Connection!" warning in red under the time.
  • The log window says "Table 'tracks' already exists (1050)".
  • Opening the Music Library gives me the same error in a modal dialog.
  • Using the Tools -> Convert Additional Info feature tells me it processes X number of tracks, but nothing goes in to the database.

I have enabled query logging on the server, and these are the only queries that get run when RB starts:
Code:
190101 16:24:10	    16 Quit	
190101 16:25:15	    17 Connect	root@10.99.1.143 as anonymous on rb_live
		    17 Query	SET NAMES utf8
		    17 Query	SET SQL_AUTO_IS_NULL = 0
		    17 Query	SHOW VARIABLES LIKE 'lower_case_table_names'
		    17 Query	CREATE DATABASE IF NOT EXISTS rb_live CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
		    17 Prepare	SELECT * FROM information_schema.tables WHERE table_schema='rb_live' AND table_name='version'
		    17 Query	SHOW INDEX FROM `information_schema`.`tables`
		    17 Execute	SELECT * FROM information_schema.tables WHERE table_schema='rb_live' AND table_name='version'
		    17 Close stmt	
		    17 Query	CREATE TABLE tracks (fn VARCHAR(768) UNIQUE NOT NULL, bpm TEXT, rating INT, gender INT, language TEXT, lastplayed TEXT, playcount INT, intro INT, outro INT, cuein INT, cueout INT, fadein INT, fadeout INT, mixpoint INT, tracklen INT, level DOUBLE, identifier TEXT, disablesong INT, startdate TEXT, enddate TEXT, rgtrack TEXT, rgalbum TEXT, hookin TEXT, hookout TEXT, voiceins TEXT, voiceinsparams TEXT, field1 TEXT, field2 TEXT, field3 TEXT, field4 TEXT, field5 TEXT)
I have tried with both a dedicated MariaDB user ('radioboss') and the MariaDB 'root' user, both with the same result.

The 'tracks' table definitely does exist:
Code:
MariaDB [rb_live]> SHOW TABLES;
+-------------------+
| Tables_in_rb_live |
+-------------------+
| tracks            |
+-------------------+
1 row in set (0.000 sec)

MariaDB [rb_live]> SELECT * FROM tracks;
Empty set (0.000 sec)

MariaDB [rb_live]>

What am I doing wrong?
 
It shouldn't be happening. I suggest removing all RadioBOSS tables, or at least the "tracks" and "version" tables and start over.
 
Thanks, I have tried that once. At least, removing the tracks table. There are no other tables:
Code:
MariaDB [rb_live]> show tables;
+-------------------+
| Tables_in_rb_live |
+-------------------+
| tracks            |
+-------------------+
1 row in set (0.000 sec)
 
Thank you for the information, we'll see what could be wrong there (if it's a bug, we'll fix it in the upcoming RadioBOSS 5.8.2, within 10 days).
 
While this is not reproduced yet here, I suggest trying MariaDB 10.2 (instead of 10.3), and also delete all tables (or, better, use a different database).
 
OK, I uninstalled MariaDB 10.3 and wiped the data from disk (rm -Rf /var/lib/mysql), and installed 10.2 but still no joy.  The only difference is now RB complains about a different table:
Code:
Table 'rb_live.cache2' doesn't exist (1146)

(Don't worry about the password below; it's a temporary throwaway password for testing this.)
Code:
dbsvr ~ # mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 36
Server version: 10.2.21-MariaDB-log MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.002 sec)

MariaDB [(none)]> CREATE USER 'radioboss'@'%' IDENTIFIED BY 'mZG7eo8arHIC';
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON rb_live.* TO 'radioboss'@'%' IDENTIFIED BY 'mZG7eo8arHIC';
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> CREATE DATABASE rb_live;
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| rb_live            |
+--------------------+
4 rows in set (0.000 sec)

After updating RB settings and restarting RB:
Code:
MariaDB [(none)]> USE rb_live;
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
MariaDB [rb_live]> SHOW TABLES;
+-------------------+
| Tables_in_rb_live |
+-------------------+
| tracks            |
+-------------------+
1 row in set (0.000 sec)
FYI, host system is a CentOS 7 virtual machine, running MariaDB from the official MariaDB repositories (http://yum.mariadb.org/10.2/centos7-amd64)

EDIT:
Here's the MariaDB log of the RadioBoss actions:
Code:
190111 17:22:13    27 Connect   radioboss@10.99.1.143 as anonymous on rb_live
                   27 Query     SET NAMES utf8
                   27 Query     SET SQL_AUTO_IS_NULL = 0
                   27 Query     SHOW VARIABLES LIKE 'lower_case_table_names'
                   27 Query     CREATE DATABASE IF NOT EXISTS rb_live CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
                   27 Prepare   SELECT * FROM information_schema.tables WHERE table_schema='rb_live' AND table_name='version'
                   27 Query     SHOW INDEX FROM `information_schema`.`tables`
                   27 Execute   SELECT * FROM information_schema.tables WHERE table_schema='rb_live' AND table_name='version'
                   27 Close stmt
                   27 Query     CREATE TABLE tracks (fn VARCHAR(768) UNIQUE NOT NULL, bpm TEXT, rating INT, gender INT, language TEXT, lastplayed TEXT, playcount INT, intro INT, outro INT, cuein INT, cueout INT, fadein INT, fadeout INT, mixpoint INT, tracklen INT, level DOUBLE, identifier TEXT, disablesong INT, startdate TEXT, enddate TEXT, rgtrack TEXT, rgalbum TEXT, hookin TEXT, hookout TEXT, voiceins TEXT, voiceinsparams TEXT, field1 TEXT, field2 TEXT, field3 TEXT, field4 TEXT, field5 TEXT)
                   27 Query     ALTER TABLE tracks ADD dateadded TEXT
                   27 Query     ALTER TABLE cache2 MODIFY fn VARCHAR(768)
Looks like it's trying to alter the 'cache2' table before it creates it?
 
Thank you for the information, we'll make sure it works in the next RadioBOSS 5.8.2 release, within 5-7 days.
 
Back
Top