mysql-connector

com.mysql.jdbc.Driver what to do?

随声附和 提交于 2019-12-02 08:12:36
I am getting this when i try to launch our java server: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver But i have the mysql-connector-java-5.1.22-bin.jar in the same folder where the script is, and making this when i run the script: java -cp mysql-connector-java-5.1.22-bin.jar -jar AvatarServer.jar But still getting this. What to do? I am using af CentOS server. root@host [/home/nagoom/Server_Example]# java -cp mysql-connector-java-5.1.22-bin.jar -jar AvatarServer.jar ************************ ** FIRING UP SERVER! ** ************************ Running MySQLChatMessageSaver java.lang

ERROR: The connection is in autoCommit mode

≡放荡痞女 提交于 2019-12-02 07:21:32
what's wrong with my code? I'm using mysql connector to work with mysql database. everything seems cool in build phase but when I run my code I get this error : ERROR: SQLException in /programs/Mysql/main.cpp (main) on line 24 ERROR: The connection is in autoCommit mode (MySQL error code: 0, SQLState: ) this is my complete code : #include <stdlib.h> #include <iostream> #include "mysql_connection.h" #include <cppconn/driver.h> #include <cppconn/exception.h> #include <cppconn/prepared_statement.h> using namespace std; using namespace sql; int main(void) { try { Driver *driver; Connection *con;

Very slow opening MySQL connection using MySQL Connector for .net

☆樱花仙子☆ 提交于 2019-12-02 06:47:23
问题 I am trying to solve the problem of very long response times from MySQL when opening a connection using the MySQL Connector for .net. I have installed MySQL 5.5 running on an Azure VM (Server 2008) with --skip-name-resolve, and the database user accounts' host restrictions are using IP addresses. I am using the latest MySQL Connector for .net in my WCF service running on Azure (in the same location US- East, I have been using a trial subscription, no affinity set). My connection string in the

MySQL Connector appending the enum with the value one less than the actual one

痞子三分冷 提交于 2019-12-01 20:59:55
I'm using the MySQL Connector for .NET to manage a MySQL database from C#. When I try to insert an enum into the database it appends the enum with the value one less than the actual one. public enum MyEnum { FirstValue, SecondValue, ThirdValue; } public void InsertEnum() { MySqlConnection con = new MySqlConnection(connStr); string sql = "INSERT INTO table (Col1) VALUES (@enumVal);"; MySqlCommand cmd = new MySqlCommand(sql, con); cmd.Parameters.AddWithValue("@enumVal", MyEnum.SecondValue); //Note I'm trying to insert 'SecondValue' --^ con.Open(); cmd.ExecuteNonQuery(); con.Close(); } This

Unraised exception using Tweepy and MySQL

强颜欢笑 提交于 2019-12-01 13:43:48
I am trying to use Tweepy to store tweets in a MySQL DB. The code works fine, with the exception of once I try to execute the SQL command to insert the data into the database. Code is as follows: #MySQL connection attempt try: cnx = mysql.connector.connect(**config) cursor = cnx.cursor() except mysql.connector.Error as err: if err.errno == errorcode.ER_ACCESS_DENIED_ERROR: print("Something is wrong with your user name or password") elif err.errno == errorcode.ER_BAD_DB_ERROR: print("Database does not exist") else: print(err) class StdOutListener(StreamListener): def on_data(self, data): tweet

Python/MySQL query error: `Unknown column`

孤人 提交于 2019-12-01 09:07:43
This script is meant to act as a command-line front-end to add records to a locally hosted MySQL database. I am getting this error: mysql.connector.errors.ProgrammingError: 1054 (42S22): Unknown column 'watermelon' in 'field list' But watermelon is the value I am trying to enter, not the column name! Here is the script: #! /usr/bin/python #use command line as front end to enter new rows into locally hosted mysql database import mysql.connector #create inputs new_fruit = raw_input('What fruit do you want to add? ') new_fruit_type = raw_input('Which type of ' + new_fruit + '? ') #connect to

Python2.7 MySQL Connector Error on LOAD DATA LOCAL INFILE

眉间皱痕 提交于 2019-12-01 08:57:56
I'm trying to dynamically load census data into a mysql database (from .csv files) using Python and MySQL Connector. I can't figure out why I am getting the error: Traceback (most recent call last): File "miner.py", line 125, in <module> cursor.execute(add_csv_file, csv_info) File "/Library/Python/2.7/site-packages/mysql/connector/cursor.py", line 393, in execute self._handle_result(self._connection.cmd_query(stmt)) File "/Library/Python/2.7/site-packages/mysql/connector/connection.py", line 586, in cmd_query statement)) File "/Library/Python/2.7/site-packages/mysql/connector/connection.py",

Unresolved symbol: sql::mysql::get_driver_instance(void)

冷暖自知 提交于 2019-12-01 07:34:19
问题 I have a program that uses MySQL connector to talk to a MySQL database. The application runs fine using Visual Studio 2008. I'm trying to get the application to build with Visual Studio 2010 and that's where the problems began. The MySQL Connector 1.05 is not supported with VS 2010, and they don't have a binary version of 1.1.0 that works with VS 2010. The MySQL information says to download the source for Connector C++ 1.10 and build with VS 2010. After much work, I build it. The examples run

MySQL Connector/C++ BAD ACCESS crash

不问归期 提交于 2019-12-01 07:10:39
Using C++ in Xcode I try to access a MySQL database with the MySQL Connector/C++. Problem is that the program (compiled with Xcode) always crashes with EXC_BAD_ACCESS (code=13, address=0x0) when calling driver->connect(url, user, pass) In Xcode I created a complete new project (OS X > Command Line Tool), inserted the code (see below) in the main.cpp, added Boost and MySQL Connector header include paths as well as libmysqlcppconn.6.1.1.1.dylib as Link Library and hit the Run button. Next thing is, when I compile the program manually using c++ -o test -I /usr/local/mysqlConnector/include/

Python/MySQL query error: `Unknown column`

随声附和 提交于 2019-12-01 06:57:44
问题 This script is meant to act as a command-line front-end to add records to a locally hosted MySQL database. I am getting this error: mysql.connector.errors.ProgrammingError: 1054 (42S22): Unknown column 'watermelon' in 'field list' But watermelon is the value I am trying to enter, not the column name! Here is the script: #! /usr/bin/python #use command line as front end to enter new rows into locally hosted mysql database import mysql.connector #create inputs new_fruit = raw_input('What fruit