Unable to open database: MyVideos119 - access denied

Hello folks!

Fresh install of Vero 4K+ with latest and greatest build available
Trying to setup MySQL (MariaDB) again - but end up with an Access denied for the user.

Here is what I have done so far:

  • Fresh install
  • Fixed IP address
  • Setting up MySQL from My OSMC in kodi

Using SSH to do the following

Install MariaDB
sudo apt-get install default-mysql-server

Login the DB
sudo mysql

Create DB user equivalent to the user in advancedsettings.xml file
create user ‘kodi’ identified by ‘kodi’;`

Give grants to user
grant all on * . * to ‘kodi’;` (remove spacing between asterix and period - added here - due to formatting issues)

ADDED - after Sams suggestion
flush privileges;`

exit DB console
quit`

Change MariaDB conf file to allow access from other hosts than localhost
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf

Change bind-address
bind-address = 0.0.0.0

Ctrl+X exit and confirm to save file

Restart the service
sudo service mysql restart

Here is what my advancedsettings.xml looks like:

advancedsettings

Adding a video source (local NAS box) - but scanning fails.

Looking at the logs - its obvious access is denied for user kodi.

I’m sure the solution is simple, but despite having tried a dozen suggestions using my Google fu abilities - nothing seems to work…
What am I doing wrong?

Here are the logs: https://paste.osmc.tv/lotejaneyu

Try running flush privileges; after granting the Kodi user access to all databases.

Done deal - unfortunately no change

  1. attempt
    sudo mysql
    flush privileges;
    quit
    reboot

  2. attempt
    sudo mysql
    grant all on *.* to 'kodi';
    quit
    reboot

No luck.

New logs: https://paste.osmc.tv/ipufijehuf

It doesn’t look to me like the password you set for the kodi user in the DB matches what your advanced settings is using. Unless you changed it for your post here.

eg, "create user ‘username’ identified by ‘password’

so, whatever password you used in the create user command needs to match the password that you put in the advanced settings.

You created the kodi user with the password of “kodi”, so you can try that in the advanced settings.

1 Like

@randallspicher

Randall!
Your’e da man :wink:

Apparently I had a massive brain fart setting this up.
I followed an old “how-to” written by myself - and didn’t pay attention to detail (as always the devil is in the details).

I ended up deleting the first created user (drop user kodi;) - recreated the user again - this time making sure there was correspondence between user and password.

To others stumbling upon this thread:

Solution is:

Create DB user equivalent to the user in advancedsettings.xml file
create user ‘user-in-advancedsettings.xml’ identified by ‘password-in-advancedsettings.xml’;

which in my case would be like this:

create user ‘kodi’ identified by ‘Mysecret’;`

Thanks a lot for contributing with a set of fresh eyes, and ultimately serving the solution!
Cheers!