Access denied trying to use mysql

Need help? Post your questions here.

Moderator: moderators

Access denied trying to use mysql

Postby Ernie_D » Mon Mar 05, 2018 8:12 pm

I've set the startup option as --db=jdbc:mysql://localhost:3306/subsonic?user=root&password=******&characterEncoding=UTF-8.

As described at http://www.subsonic.org/pages/database.jsp

The subsonic log reports:

Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: NO))


Do I need to configure the MySQL server, and if so, what do I need to change?

Thanks for any assistance.
Ernie_D
 
Posts: 7
Joined: Wed Jun 20, 2012 5:04 pm

Re: Access denied trying to use mysql

Postby toolman » Tue Mar 06, 2018 1:11 pm

Did you use MySQL version 5.6 or 5.7? (these are the versions that are tested...)
Did you create the empty database called "subsonic"?
Does your installation of MySQL really use port 3306?
If you're using Windows did you configure the firewall correctly?
Are you sure you are using the correct username and password for MySQL ?
The error seems to indicate that that's the problem.
toolman
 
Posts: 537
Joined: Fri Dec 11, 2009 4:18 pm
Location: Netherlands

Re: Access denied trying to use mysql

Postby stukafox » Mon Jun 22, 2020 8:00 pm

Hello,

Sorry for the forum necromancy, but I have the exact same problem.

>Did you use MySQL version 5.6 or 5.7? (these are the versions that are tested...)
$#>mysql --version
mysql Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using EditLine wrapper

Did you create the empty database called "subsonic"?
Yes

Does your installation of MySQL really use port 3306?
Yes

If you're using Windows did you configure the firewall correctly?
I'm on Linux, and yes.

Are you sure you are using the correct username and password for MySQL ?
Yes.

JDBC URL:
SUBSONIC_ARGS='--https-port=24080 --max-memory=200 --db=jdbc:mysql://localhost:3306/subsonic?user=redacted&password=redacted&characterEncoding=UTF-8'

Head of stack trace in subsonic_sh.log:
Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'redacted'@'localhost' (u
sing password: NO)):
java.sql.SQLException: Access denied for user 'redacted'@'localhost' (using password: NO)

Any suggestion is welcome.

Thanks.
stukafox
 
Posts: 2
Joined: Mon Jun 22, 2020 7:17 pm

Re: Access denied trying to use mysql

Postby stukafox » Mon Jun 22, 2020 8:21 pm

Here is the solution to the problem -- this should be added to the instructions as they are currently incorrect: http://www.subsonic.org/pages/database.jsp

The JDBC MySQL URL needs to be as follows:

SUBSONIC_ARGS="--https-port=<port number> --max-memory=200 --db='jdbc:mysql://localhost:3306/subsonic?user=redacted&password=redacted&characterEncoding=UTF-8'"

Note the double-quotes, " , around the body of the SUBSONIC_ARGS= themselves and the SINGLE quote, ' , around the JDBC URL. If this format is not used, the password will not be passed to MySQL.

Thanks.
stukafox
 
Posts: 2
Joined: Mon Jun 22, 2020 7:17 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 15 guests