Libmysql is a client library for connecting C written application to MySql.
Questions tagged [libmysql]
113 questions
0
votes
0 answers
Why mysql_init(nullptr) leads to segmentation fault in the following code?
My code is as follow:
main.cc
int main(void){
int port, sqlPort, ConnectionNum, threadNum;
string sqlUser, sqlPwd, DBName;
try{
Config Settings("./config.ini");
Settings.Read("port",port);
…

Phoenix Chao
- 390
- 3
- 19
0
votes
0 answers
How to improve the time taken to establish connections to database when using 400+ connections?
I have a multithreaded C application that connects to Database(DBaaS to be specific) using MySQL APIs.
It makes around 400+ connections using mysql_real_connect() function.
It takes around 10 minutes to make all the 400+ connections.
Can anyone…

himanshu
- 175
- 3
- 12
0
votes
2 answers
Case-sensitive string comparison in SQL (MariaDB, MySQL)
I have read many questions and answers on StackOverflow (posted years ago) concerning this issue, but none that I found have worked using a 10.3.22-MariaDB server and libmysql - 5.6.43 as database client.
I am trying to do the following:
SELECT *…

user10398534
- 145
- 14
0
votes
0 answers
How to use internal headers of mysql?
Recently I'm trying to build a tool to synchronize data between databases using binlog. The way to do this is kind of like, the tool pretends to be a MySQL server and then communicates with a real MySQL server via MySQL C/S protocol. I went to…

BowenDean
- 1
- 4
0
votes
3 answers
libmysql: warning: address of local variable ‘rows’ returned (C++/C)
I'm using g++.
Implemented some wrapper for my convenience to work with libmysql. Also making C/C++ compatible code.
static MYSQL_RES *db_query(MYSQL *db, const char *query, va_list params) {
char q[500];
vsprintf(q, query, params);
…

xercool
- 883
- 1
- 8
- 24
0
votes
1 answer
Libmysqlclient.so: undefined reference to 'X509_check_ip_asc'
I'm trying to add the mysqlclient lib to my project. During compilation i get the errors:
libs/sqlapi/lib/libmysqlclient.so: undefined reference to `X509_check_ip_asc'
libs/sqlapi/lib/libmysqlclient.so: undefined reference to…

Da_Rudi
- 1
- 4
0
votes
1 answer
Batch Insert in Mysql C++ Connector
We are using mysql connector for c++(official library), however there is no batchupdate or batchinsert method in the c++ library (Although in java those methods do exist).
For accomplishing this I've tried something like below and it worked. However…

tolgatanriverdi
- 561
- 9
- 31
0
votes
0 answers
class std::auto_ptr’ is deprecated while trying to compile with mysql++ library
I'm facing a compilation problem while trying to use mysql++.h in my C++ program on an ASUS Tinker Board.
Includes look like this :
#include
#include
G++ command executed is this one :
g++ -I/usr/include/mysql…
0
votes
1 answer
mysql_query() with simple query segfault
I have this super simple code :
#include
#include
int main() {
MYSQL mysql;
mysql_init(&mysql);
mysql_options(&mysql, MYSQL_READ_DEFAULT_GROUP, "option");
if (mysql_real_connect(&mysql, "localhost", "root",…

Pierre LAGOUTTE
- 81
- 1
- 12
0
votes
0 answers
I'm having trouble with libmysql on ubuntu
I have a service, which runs fine under debian 8 (jessie). Now I would like to run it on a ubuntu 18.04 machine.
But when I start the service, I get the following error:
error while loading shared libraries: libmysqlclient.so.18
How can I fix this?

Ben
- 4,486
- 6
- 33
- 48
0
votes
0 answers
Reading database in C and populating array of structure
I am reading from MySQl in C. But after populating structure in C when I print the values these are not printed.
MySQL Table:
mysql> select * from student;
+------+----------+-----------+----------------+-----------+----------------+
| id | name …

LCP
- 71
- 1
- 6
0
votes
2 answers
Can't find libmysql.dll and others connecting to MYSQL from ZeosLib in Delphi
Excuse me, I would like to ask about how can I connect Delphi with MYSQL with ZeosLib. I already know the steps but I can't get it yet cause when I change the Properties in ZConnection where Connection = True, it can't. And this is the message
By…

agawmd
- 33
- 3
- 9
0
votes
1 answer
Laravel adding extra field in table results in General error: 2057
My problem is quite simple, but I can't find any answer for this specific issue.
The thing is, I have this migration in Laravel:
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
…

Fred
- 313
- 1
- 2
- 11
0
votes
1 answer
MySQL transaction and buffered list of requests
I have a C++ code that parses files and updates the MySQL Database according to the content of these files.
I run my code in Windows 10, with MySQL 5.7, and my base uses the InnoDB engine. The MySQL calls are performed through a wrapper of my own…

Matthieu.V
- 160
- 9
0
votes
1 answer
Compiling MySQL C API client does not link libmysqlclient.so.20
I'm writing some loadable modules for Zabbix, as such, compiling shared objects. I've written one which uses the MySQL C API to read some data from tables, it's fairly standard, and includes:
#include
#include
My gcc command…

Joe Brailsford
- 199
- 8