I am working on a server application in c++ that will connect to a MySQL Server using MySQL Connector/C++ 8.0.
The server has X plugin disabled and I cannot change that.
https://dev.mysql.com/doc/refman/8.0/en/x-plugin-disabling.html
It is possible to connect to this server using MySQL Connector/C++ 8.0 ?
I found nothing in the docs.
I have tried to modify the protocol in the session connection string from mysqlx:// to tcp:// but my config supports only mysqlx.
There is something I am missing the connection is possible only using MySQL Connector/C++ 1.x ?
The error I am receiving is CDK Error: unexpected message. I can successfully connect to a local MySql database instance.
Looking at the question tags, I guess you are using Amazon RDS and, as far as I can tell, at the moment, Amazon RDS does not support the X Plugin and consequently does not support X Protocol connections (mysqlx:// on port 33060 by default).
However, Connector/C++ also supports JDBC and whatnot, so you should be able to connect to any MySQL instance on port 3306 as well.
Disclaimer: I'm the lead developer of the MySQL X DevAPI Connector for Node.js
Related
the error i m gettingenter image description hereMy intention is to have ORACLE 12 + Informatica on my local system.
I have installed Oracle and it is working fine. While I am trying to run SERVER INSTALLATION for INFORMATICA, I am having difficulty with configuring the database for domain connection repository. The connection is failing even though I am giving correct oracle credentials which are as below:
DB USERID: infadmin
JDBC URL:localhost:1521
Service: orcl
My questions is:
Why is it failing? Do I have to do anything special before trying this connection like installing any special jdbc drivers or something?
Your replies are much awaited.Thanks in advance.
Vaibhav Gautam
Check the contents of the tnsnames.ora file located at <Oracle Installation Direcotry>/network/admin. Make sure that the hostname, port no., service name matches exactly.
Also, make sure the oracle service is running.
Referring to Pentaho's Doc, we should be using RedshiftJDBC4.jar instead of version 4.1. I have downloaded the driver and placed it in the lib/ directory. Relaunched spoon.sh and I noticed it is no longer complaining about not able to find the com.amazon.redshift.jdbc4 class driver as I was using the 4.1 driver earlier. However, it still could not establish the connection.
Error connecting to database [aws_redshift] :
org.pentaho.di.core.exception.KettleDatabaseException: Error occurred
while trying to connect to the database
Error connecting to database: (using class
com.amazon.redshift.jdbc4.Driver) Amazon Error setting
default driver property values.
Can anyone help on this?
On the flip side, I can connect to my endpoint using SQLWorkbench/J, a SQL client tool.
Somehow I managed to get it working. It seems that downloading AWS Redshift drivers version 4, 4.1, or 4.2 and placing them in the lib/ directory did not work for me for each version by choosing Redshift as connection type (in Database Connection setup).
Instead, I chose PostgreSQL using JDBC. In host name field, I included the endpoint WITHOUT port number 5439 at the end. So, the endpoint should just end with ...amazonaws.com. Fill in database name, port number of 5439, and username and password. If this did not work, try downloading the latest PostgreSQL JDBC driver and placing it in lib/ directory and try again.
I try to connect to my MySql database with c++ but it won't connect and I cant figure out why. The Instance of the MYSQL object was initialised and I also tried to connect to my database with Java and Php and it worked...
The Mysql server is not hosted by me, it's hosted by an German server provider so I suggest on the server side will be everything ok.
Also the libs and includes are linked correct since the initialisation of my MYSQL instance works fine.
The mysql version I use is 5.0.X
this is the line of code where I try to connect to the database:
MYSQL *connect = mysql_init(NULL);
mysql_real_connect(connect, "xxxxx.db.1and1.com", "dboXXXXXX", "XXXXXX", "dbXXXXXX", 0, NULL, 0);
So I am a newbie for C++/Mysql and I am sorry if I ask something stupid.
I have encountered the error for connecting mysql from c++
SQLException: Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
I read many existing solutions for this problem and they seem to suggest restarting the server with some updated settings. However, I am trying to connect to a remote server, and I do not have the root access to that server.
Here are some more details on my server, client and connector:
The server version is 5.5.32
The client version is Ver 14.14 Distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 5.1. It is strange since this is newer than 4.1.1
I also installed MYSQL/C++ Connector 1.1 . I downloaded its source code and built it using CMake without error.
I guess that a simple fix would be to disable "secure_auth" from the connector. However, I don't know how to do this. Is there some parameters that I can pass from my C++ code?
So does anyone have any suggestions? Thanks!
I had the same problem and solved it by using Connector/C++ Connection Options.
sql::Driver *driver;
sql::Connection *con
driver = get_driver_instance();
sql::ConnectOptionsMap connectionProperties;
connectionProperties["hostName"] = sql::SQLString("tcp://192.168.0.10:3306");
connectionProperties["userName"] = sql::SQLString("root");
connectionProperties["password"] = sql::SQLString("password");
connectionProperties["useLegacyAuth"] = true;
con = driver->connect(connectionProperties);
Make sure you have connectionProperties["useLegacyAuth"] = true; and that works for me.
Pre 4.1.1 refers to the password you're trying to authenticate against. If you can't change that to use the more modern (longer) scheme, you can try
Using an older client that doesn't have secure_auth enabled by default,
Finding where to pass skip_secure_auth (may or may not work), or
Patch your client with the one-line fix at http://bugs.mysql.com/bug.php?id=75425 so that secure_auth=FALSE works
Options 2 and 3 are easy if you can use a .cnf file to connect.
My PC does not have a connection to the Internet. However, I would like to use a template(SQL Server Compact 4.0 Local Database) in my VS 2010. Is it possible to install this template without the Internet? How to do it? I have a flashcard.
In short; you will need a connection to the internet. Once established, you can install web components (which includes SQL Server Compact 4.0 Local Database and the toolkit).