2019-11-01, 00:04
(2019-10-12, 13:08)sloth85 Wrote:(2019-08-28, 05:36)OtheA Wrote:Having exact same issue at the moment. Can you explain exact steps you took to fix this? Cheers in advance.(2019-08-27, 21:35)BigMong Wrote: Sorry for the delay,
Two other thoughts about this
check the permissions of the user "KODI_18"
then try a cleanup again.sql:GRANT ALL PRIVILEGES ON `Kodi\_U01\_Video\_116`.* TO 'KODI_18'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
and/or try and do the task manually for one of the id's if able log into the database as the KODI_18 user.
just to confirm the table is workingsql:USE `Kodi_U01_Video_116`;
DELETE FROM files WHERE idFile IN (334);
Thanks BigMong. No need to apologize. Still not working for me. I ran the query from SQL and got the following:
#1146 - Table 'Kodi_U06_Video_116.bookmark' doesn't exist
Which is correct, because I didn't create anything past U05, so I expect this would be a normal error.
Okay, that fixed it. I didn't realize I needed to remove the users I didn't create from the cleanup. The query was halting at the first user that didn't exist so it couldn't complete. I went back and removed the users I didn't configure and cleaned the library and that got rid of the extras. Thanks again BigMong. I appreciate you again.
Sure thing! On step 4, just remove any users from the housekeeping that you didn't configure in step 3. Let's say if you only have two users, U1 and U2 created in step 3, you'd only reference U1 and U2 in step 4. Example:
sql:
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
-- TRIGGER FIX FOR MULT USERS --
DROP TRIGGER IF EXISTS `Kodi_U01_Video_116`.`delete_file`;
DELIMITER $$
CREATE DEFINER=`KODI_18`@`%` TRIGGER `Kodi_U01_Video_116`.`delete_file` AFTER DELETE
ON `Kodi_U01_Video_116`.`global_files`
FOR EACH ROW
BEGIN
DELETE FROM `Kodi_U01_Video_116`.bookmark WHERE idfile = old.idfile;
DELETE FROM `Kodi_U02_Video_116`.bookmark WHERE idfile = old.idfile;
DELETE FROM `Kodi_U01_Video_116`.settings WHERE idfile = old.idfile;
DELETE FROM `Kodi_U01_Video_116`.stacktimes WHERE idfile = old.idfile;
DELETE FROM `Kodi_U01_Video_116`.streamdetails WHERE idfile = old.idfile;
END$$
DELIMITER ;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;