Problem with Mysql Trigger
#1
Hi all,

Last day, I've begin to change all my network device with static ip to DHCP because I've got now a DNS Server at home.
But, I have some problem with my Kodi device.

I use it with Mysql for a while and when I created the user, I've use the IP to limit access to the kodi database:
Code:
MariaDB [(none)]> select host, user, password from mysql.user;
+-----------------------+-------------+-------------------------------------------+
| host                  | user        | password                                  |
+-----------------------+-------------+-------------------------------------------+
| localhost             | root        | *D51CD80D02A472E2C61E8384E54D8482F98F0397 |
| 192.168.1.52          | kodi        | *FAE53F8FFEF5EB8333496E10C050FFF76526FDE9 |
+-----------------------+-------------+-------------------------------------------+
Code:
MariaDB [(none)]> show grants for 'kodi'@'192.168.1.52';
+----------------------------------------------------------------------------------------------------------------+
| Grants for [email protected]                                                                                   |
+----------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'kodi'@'192.168.1.52' IDENTIFIED BY PASSWORD '*FAE53F8FFEF5EB8333496E10C050FFF76526FDE9' |
| GRANT ALL PRIVILEGES ON `MyVideos93`.* TO 'kodi'@'192.168.1.52'                                                |
+----------------------------------------------------------------------------------------------------------------+

I know, I didn't follow totally what the wiki said but as a sysadmin, I didn't want to allow all privileges to kodi user, and not on all my network (I have other database on my server)
But know, like I said I want to rename my [email protected] user to [email protected].
I did it, and it work except for view table (movie_view, tvshow_view, etc...). After some research I fount that they're triggers to some table and they didn't work because the user didn't exist anymore !!

I've read that we can't change the trigger user, I have to delete it and recreate it with the good one. I'm not very confortable with MySQL/MariaDB so I don't know what trigger really are...

So what the best to do here ?? Huh
1- Make an awesome query to delete and recreate the trigger correctly
2- Export database, create a new one with correct user and import my old database to it (with Kodi, not SQL)
3- Put a static address to my DHCP (<= Is what I do now, but when I want to put another Kodi device I will have the problem too...)

Thanks for you help
Reply
#2
go for 2 and make a dump of your db before
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
Problem with Mysql Trigger0