Piraveena Paralogarajah
Piraveena Paralogarajah

Reputation: 1515

Error in sql connector configuration when connecting using Ballerina MYSQL Client

I'm trying to comment using Ballerina Mysql client.(Ballerina version - 0.990.2 ,MySQL JDBC driver-5.1.6) But I'm getting error as

error: error in sql connector configuration:Failed to initialize pool: Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property.:Unknown initial character set index '255' received from server. Initial client character set can be forced via the 'characterEncoding' property. {}

 mysql:Client testDB = new({
            host: "localhost",
            port: 3306,
            name: "users",
            username: "root",
            password: "password",
            poolOptions: { maximumPoolSize: 5 },
            dbOptions: { useSSL: false }
        });

Upvotes: 1

Views: 238

Answers (1)

Piraveena Paralogarajah
Piraveena Paralogarajah

Reputation: 1515

I found the solution for the error. This is due to the mismatch in the mysql version and MySQL connector version. I downloaded the suitable version from http://central.maven.org/maven2/mysql/mysql-connector-java/

Upvotes: 1

Related Questions