2019-07-27, 21:49
(2019-07-27, 20:56)black_eagle Wrote: [ -> ]DROP USER Kodi;I'm not sure how strict MySQL is, but better keep uppercase and lowercase separate.
Kodi's mysql user is 'kodi'.
(2019-07-27, 20:56)black_eagle Wrote: [ -> ]DROP USER Kodi;I'm not sure how strict MySQL is, but better keep uppercase and lowercase separate.
(2019-07-27, 21:49)Klojum Wrote: [ -> ]You are right of course, and that was a typo on my part, but of course, the actual username could be anything. Kodi can use anything as a username as long as the username and password are specified in advancedsettings.xml. Tt could be 'Mr_Blobby', 'white_spots_on_pink_are_cool' or whatever.(2019-07-27, 20:56)black_eagle Wrote: [ -> ]DROP USER Kodi;I'm not sure how strict MySQL is, but better keep uppercase and lowercase separate.
Kodi's mysql user is 'kodi'.
(2019-07-27, 20:56)black_eagle Wrote: [ -> ]SSH to the server then.
Once connected, enter (assuming you set up a root user for mariadb when you installed it)
php:mysql -u root -p
If you do not know the password you can follow this guide to change it.
Once logged in as the root user, you need to determine if the kodi user already exists.php:SELECT User FROM mysql.user;
If that doesn't show the kodi user, then all is good !! If it does, we need to remove it withphp:DROP USER Kodi;
Now we should be able to create the kodi user withThat should create a kodi user with a password of 'kodi' with full privileges.sql:GRANT ALL ON *.* TO 'kodi' @ '%' IDENTIFIED BY 'kodi';
You then need to enterso that everything is updated.sql:FLUSH PRIVILEGES;
At this point, you can create your 'advancedsettings.xml' pointing to your db server and kodi should be able to login and create the relevant databases.
Hope that helps.
sql:CREATE USER 'kodi' IDENTIFIED BY 'kodi';
GRANT ALL ON *.* TO 'kodi';
sql:CREATE USER 'kodi';
GRANT ALL ON *.* to 'kodi';
FLUSH PRIVILEGES;
sql:mysql> DROP USER 'kodi';
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT user, host FROM mysql.user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| xbmc | % |
| zabbix | % |
| debian-sys-maint | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+------------------+-----------+
6 rows in set (0.00 sec)
mysql> CREATE USER 'kodi';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL ON *.* to 'kodi';
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT user, host FROM mysql.user;
+------------------+-----------+
| user | host |
+------------------+-----------+
| kodi | % |
| xbmc | % |
| zabbix | % |
| debian-sys-maint | localhost |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+------------------+-----------+
7 rows in set (0.00 sec)
mysql> SHOW GRANTS FOR 'kodi';
+-------------------------------------------+
| Grants for kodi@% |
+-------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'kodi'@'%' |
+-------------------------------------------+
1 row in set (0.00 sec)
mysql> quit;
Bye
floyd@sapphire:~$ mysql -u kodi -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 441711
Server version: 5.7.21-0ubuntu0.16.04.1 (Ubuntu)
Copyright © 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>