mysql-connector

MySQL SecureString as connection string

痞子三分冷 提交于 2019-12-24 05:40:19
问题 I've a general question about a SecureString as connection string for MySql-Connector. If i understood it right, SecureStrings are a "safe" way to store strings within my program. Now i've two problems with that: I've to read in the password at installation ( TextBox which is string and therefore unsafe) I've to build a connection string for the MySQL-Connector which is string (unsafe again) example: MySqlConnection con = new MySqlConnection(); MySqlConnectionStringBuilder builder = new

MySQL SecureString as connection string

我的梦境 提交于 2019-12-24 05:40:03
问题 I've a general question about a SecureString as connection string for MySql-Connector. If i understood it right, SecureStrings are a "safe" way to store strings within my program. Now i've two problems with that: I've to read in the password at installation ( TextBox which is string and therefore unsafe) I've to build a connection string for the MySQL-Connector which is string (unsafe again) example: MySqlConnection con = new MySqlConnection(); MySqlConnectionStringBuilder builder = new

Resolving undefined references with MySQL C++ Connector

浪子不回头ぞ 提交于 2019-12-24 00:52:41
问题 I'm trying to compile this (also listed in the mysql c++ connector documentation): http://pastebin.com/HLv4zR0r But I get these errors: http://pastebin.com/3t0UbeFy This is how I tried compiling: g++ -o test test.cpp `mysql_config --cflags --libs` -I./include/cppconn -L./lib -lmysqlcppconn-static The result of running mysql_config --cflags --libs is: -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -L/usr/lib/x86_64-linux-gnu -lmysqlclient -lpthread -lz -lm -lrt -ldl Edit: After

MySQL C++ Connector Unresolved Dependencies (VS 2015)

回眸只為那壹抹淺笑 提交于 2019-12-24 00:46:28
问题 I'm trying to compile MySQL Connector C++ on Windows / Visual Studio 2015. I generated the project file using CMake according to the official instructions, which worked fine. Now when I try to compile the solution,I get the following linker errors: 5>mysqlcppconn-static.lib(mysql_client_api.obj) : error LNK2019: unresolved external symbol _mysql_server_init@12 referenced in function "public: virtual int __thiscall sql::mysql::NativeAPI::LibmysqlStaticProxy::library_init(int,char * *,char * *)

MySQL Session state provider crashes on expired sessions

醉酒当歌 提交于 2019-12-23 19:25:55
问题 I have a site running in IIS 7.5 ASP.NET 4 using MySQL Connector 6.7.4, I am trying to set it up to store session state in my database. It works fine to start with (I can store the state). But when I leave my browser open for a long time and then tries to refresh a page I get the following error: Duplicate entry 'jouwlxjdufet2fyvf4cwefn2-1' for key 'PRIMARY' Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more

Use parameterized query with mysql.connector in Python 2.7

混江龙づ霸主 提交于 2019-12-23 16:30:12
问题 Im using Python 2.7 with mysql.connector running in pyCharm I need to use a parameterized query like shown here and also here Given those examples, it seems like cursor.execute("SELECT * FROM automatedReports WHERE pythonFunctionName = %s", (function_name)) in the below should work. However, when I write this line in pyCharm, I get this error: The inspection says: If I run the code, I get this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server

Mac OS X Mono and MySql Connector Problem

一世执手 提交于 2019-12-23 12:15:25
问题 I downloaded mysql-connector-net-6.4.3-noinstall.zip, extracted and renamed mysql.data.dll to MySql.Data.dll: $ cd v2/ $ ls mysql.data.cf.dll mysql.data.dll mysql.data.entity.dll mysql.visualstudio.dll mysql.web.dll $ mv mysql.data.dll MySql.Data.dll $ sudo gacutil /i MySql.Data.dll Password: Installed MySql.Data.dll into the gac (/Library/Frameworks/Mono.framework/Versions/2.10.4/lib/mono/gac) I than create a symbolic link in /Library/Frameworks/Mono.framework/Versions/2.10.4/lib/mono/2.0 to

my transaction is not rollback when something goes wrong in C# with mysql?

↘锁芯ラ 提交于 2019-12-23 05:29:16
问题 I am connecting mysql 5.1 from C# by using mysql connector6.2.3.0(.net).I want to insert 3 tables at a time.So, i am using transaction for that.Suppose, when some errors encountered while inserting data into my 3rd table, then the transaction is not rollback.The data is inserted into first two tables. This is my code... MySqlDataAdapter da = new MySqlDataAdapter(); DBUtil cUtil = new DBUtil(); MySqlConnection mysqlCon=null; MySqlTransaction txn = null; try { mysqlCon = cUtil.getDbConnection()

GlassFish 5 and MySQL Connector

为君一笑 提交于 2019-12-23 02:57:10
问题 I use GlassFish 5 with mysql-connector-java-8.0.13.jar and CLASSPATH values: C:\Program Files\glassfish5\glassfish\lib C:\Program Files\glassfish5\glassfish\domains\domain1\lib C:\Program Files\glassfish5\glassfish\domains\domain1\lib\ext After several restarts of both the server and the laptop it still gives this error: Ping Connection Pool failed for MySQL_sakila. Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource Please check the server.log for

Remotely connect to MySQL with Python mysql.connector

二次信任 提交于 2019-12-22 09:37:45
问题 The following code (ran from a different machine than the mysql server, within the same LAN), to locally connect to MySQL database using Python3 and mysql.connector works: import mysql.connector cnx = mysql.connector.connect(host='192.168.0.24', database='import_test',user='user_builder', password='password***', port=3309) However, the following code, to remotely connect to the same database, does NOT work : import mysql.connector cnx = mysql.connector.connect(host='http://imaginarywebsite