Comments - Access Denied Error updating from JDBC Connector 1.6.5 to 1.7.0

4 years, 6 months ago Diego Dupin

sorry for late answer, i've not seen anything that can cause that kind of issue in changelog (https://mariadb.com/kb/en/library/mariadb-connector-j-170-changelog/)

Nothing has been reported about that kind of error in JIRA. Don't hesitate to create a JIRA issue (https://jira.mariadb.org/projects/CONJ) if that kind of error occurs

 
3 years, 11 months ago Mark Harrington

Hi I had the same issue this morning using MariaDB on Raspberry pi

This is how I how corrected this

You should have a file named my.cnf which is located in /etc/mysql

1: sudo nano this

2: This may point to other imports which on my RPI are located @ /etc/mysql/mariadb.conf.d/

3:sudo nano 50-server.cnf this file in the above directory

4: Scroll down to bind address and change this to 0.0.0.0 5: hit control + x and save this file

Next ::

1: Restart your maria db install with service mariadb restart

2: All being well mariadb service should be now up an running

3: issue your standard command from terminal (Im assuming Linux here ) with sudo mysql -u <username> - p

4: Enter password @ prompt .

Your MySQL prompt should appear as follows below

MariaDB [(none)]>

Enter command as follows below

5: GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'yourpassword';

6: Hit the enter key

7: Now flush all privileges with command below

FLUSH PRIVILEGES;

8: Hit the enter key

9: quit mariadb in the usual manner with command ,"quit"and hit enter

Fingers crossed all should work with your JDBC connector

PS make sure also you have enabled exceptions for UFW firewall in your remote machine allowing access to port 3306 for MariaDB

Finally as last check make sure your encoding is correct . On mine this so happens to be UTF-8 otherwise this will also lock you out

As further thought upgrade your JDBC connector to latest current version

This is now

Hi I had the same issue this morning using MariaDB on Raspberry pi This is how I how corrected this

You should have a file named my.cnf which is located in /etc/mysql

1: sudo nano this

2: This may point to other imports which on my RPI are located @ /etc/mysql/mariadb.conf.d/

3:sudo nano 50-server.cnf this file in the above directory

4: Scroll down to bind address and change this to 0.0.0.0 5: hit control + x and save this file

Next ::

1: Restart your maria db install with service mariadb restart

2: All being well mariadb service should be now up an running

3: issue your standard command from terminal (Im assuming Linux here ) with sudo mysql -u <username> - p

4: Enter password @ prompt .

Your MySQL prompt should appear as follows below

MariaDB [(none)]>

5: GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'yourpassword';

6: hit the enter key

7: Now flush all privileges with command below

FLUSH PRIVILEGES;

8: Hit the enter key

9: Quit mariadb in the usual manner with command ,"quit"and hit enter

Fingers crossed all should work with your JDBC connector

PS make sure also you have enabled exceptions for UFW firewall in your other machine allowing access to port 3306 for MariaDB

As final thought check your charset encoding mine is set as example to UTF-8 If this is not correct then you could also find this giving you issues

Additionally upgrade and re install your JDBC Driver

Ive also found that if you can connect to this using Dbweaver then all should work with net beans alternatively as stand-alone compilation of Java code

Current version is 2.4.3 downloadable from site

Hope that helps

Mark Harrington

 
4 years, 6 months ago Soheil Pour

I think starting from version 1.7.0, the user should specify the Database in the URL and as I didn't specify that I got the error. Do you confirm that?

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.