Giter Site home page Giter Site logo

mysqludf / lib_mysqludf_sys Goto Github PK

View Code? Open in Web Editor NEW
444.0 33.0 213.0 152 KB

A UDF library with functions to interact with the operating system. These functions allow you to interact with the execution environment in which MySQL runs.

Shell 16.68% C 83.32%

lib_mysqludf_sys's People

Contributors

jasny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lib_mysqludf_sys's Issues

Need a 64 bit version or source code !

Hello,

This plugin seems promising BUT only for 32-bits systems.

Please, let us help you if you need and

  1. Make a 64-bit .so available
  2. Give us the source code if you please, so that we can make it go.

Moreover, it would be nice to be able to double check the source.

Many thanks for your great work ;)

sql file run in phpmyadmin run time error

Error
SQL query:
CREATE FUNCTION lib_mysqludf_sys_info RETURNS string SONAME 'lib_mysqludf_sys.so';
MySQL said: Documentation
#1126 - Can't open shared library 'lib_mysqludf_sys.so' (errno: 126 The specified module could not be found.)

file name lib_mysqludf_sys.sql . how to solution in file .
I am trying to call push .php name by using mysql trigger.This is the code of mysql
CREATE TRIGGER push_Trigger BEFORE INSERT ON tbl_push_notifications
FOR EACH ROW BEGIN
DECLARE cmd CHAR(255);
DECLARE result int(10);
SET cmd=CONCAT('http://107.180.100.93/api/push.php');
SET result = sys_exec(cmd);
END
i insert new entry time got error -
Error
SQL query:

INSERT INTO tbl_push_notifications (id, message_id, from_user_id, to_user_id, message, is_sent, created_at) VALUES
(11, 57, '[email protected]/ilohoUser', '[email protected]', 'Offline message', 0, '2016-07-03 03:23:04');
MySQL said: Documentation
#1305 - FUNCTION Eric_iloho_db.sys_exec does not exist .

please me
thanks

Cannot open shared object file: No such file or directory)

Hi! Im looking forward in getting this set up for my raspberry project. I'm running raspbian and I opened mySQL using root and tried to create the function with
CREATE FUNCTION sys_eval RETURNS STRING SONAME 'lib_mysqludf_sys.so';
but it gives me this error:
Can't open shared library 'lib_mysqludf_sys.so' (errno: 0 /usr/lib/mysql/plugin/lib_mysqludf_sys.so: cannot open shared object file: No such file or directory)
Where is this library?
I did install libmysqlclient15-dev.

ERROR 1125 (HY000) at line 29: Function 'lib_mysqludf_sys_info' already exists

lib_mysqludf_sys]# ./install.sh
Compiling the MySQL UDF
gcc -m64 -fPIC -Wall -I/usr/local/mysql/include -I. -shared lib_mysqludf_sys.c -o /usr/lib64/mysql/plugin/lib_mysqludf_sys.so
MySQL UDF compiled successfully

Please provide your MySQL root password
Enter password:
ERROR 1125 (HY000) at line 29: Function 'lib_mysqludf_sys_info' already exists
ERROR: unable to install the UDF
[root@hq-dv-mysql-101 lib_mysqludf_sys]#

Fedora 20. Plugin doesn't work

Hi,
Doesn't work!

Fedora: 20
Mysql..: 5.6.19

[lab@localhost ~]$ sestatus
SELinux status: disabled

Recompiled with
gcc -DMYSQL_DYNAMIC_PLUGIN -fPIC -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so

Plugin directory in /etc/my.cnf set to
plugin_dir=/var/lib/mysql/plugin

File lib_mysqludf_sys.so copied to /var/lib/mysql/plugin

Directory /var/lib/mysql/plugin owner set to mysql:
sudo chown mysql:mysql -R /var/lib/mysql/plugin

Permissions set to 777
chmod 777 -R /var/lib/mysql/plugin

Functions successfully created
DROP FUNCTION IF EXISTS lib_mysqludf_sys_info;
DROP FUNCTION IF EXISTS sys_get;
DROP FUNCTION IF EXISTS sys_set;
DROP FUNCTION IF EXISTS sys_exec;
DROP FUNCTION IF EXISTS sys_eval;

CREATE FUNCTION lib_mysqludf_sys_info RETURNS string SONAME 'lib_mysqludf_sys.so';
CREATE FUNCTION sys_get RETURNS string SONAME 'lib_mysqludf_sys.so';
CREATE FUNCTION sys_set RETURNS int SONAME 'lib_mysqludf_sys.so';
CREATE FUNCTION sys_exec RETURNS int SONAME 'lib_mysqludf_sys.so';
CREATE FUNCTION sys_eval RETURNS string SONAME 'lib_mysqludf_sys.so';

Tests terminal OK.
[lab@localhost test]$ ll /home/lab/test/
total 8
drwxrwxrwx 2 mysql mysql 4096 Jul 14 21:35 1
drwxrwxrwx 2 mysql mysql 4096 Jul 14 21:37 2

Test form mysql doesn't throw error but nothing is changed!

mysql> SELECT sys_exec('touch /var/lib/mysql/plugin/test.txt');
+--------------------------------------------------+
| sys_exec('touch /home/lab/test/1/test.txt') |
+--------------------------------------------------+
| 256 |
+--------------------------------------------------+
1 row in set (0.01 sec)

BUT modified date not changed!!!

mysql> SELECT sys_exec('cp /home/lab/test/1/test.txt /home/lab/test/2');
+-----------------------------------------------------------+
| sys_exec('cp /home/lab/test/1/test.txt /home/lab/test/2') |
+-----------------------------------------------------------+
| 256 |
+-----------------------------------------------------------+
1 row in set (0.01 sec)

File NOT copied!!!

Thanks,
Any ideas appreciated

how to install on mac

newbie here, i have tried to install using sudo ./install.sh and the output is fatal error: 'my_global.h' file not found .

Provide install instruction for mysql Docker container

After installing gcc, make and mysqlclient-dev, make still terminates with this error:

gcc -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o /usr/lib/lib_mysqludf_sys.so
lib_mysqludf_sys.c:40:23: fatal error: my_global.h: No such file or directory

compilation terminated.
Makefile:4: recipe for target 'install' failed
make: *** [install] Error 1

Please provide isntructions.

Build error

First off, thank you for writing this. I look forward to it working.

I'm getting a build error when trying to "make":
gcc -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o /usr/lib/lib_mysqludf_sys.so /usr/bin/ld: /tmp/ccqmuRkb.o: relocation R_X86_64_32 against .rodata' can not be used when making a shared object; recompile with -fPIC
/tmp/ccqmuRkb.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [install] Error 1`

I'm trying to build this on RHEL 6.3, with the Percona server (devel packages included). Any ideas?

[CentOS 6.6 64bit] sys_eval and sys_exec return strange values

Hello!

I've compiled the lib via

gcc -DMYSQL_DYNAMIC_PLUGIN -fPIC -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o lib_mysqludf_sys.so

I've then sym-linked it in the mysql's plugins folder. Eventually I've created the two functions:

CREATE FUNCTION sys_exec RETURNS int SONAME 'lib_mysqludf_sys.so';
CREATE FUNCTION sys_eval RETURNS int SONAME 'lib_mysqludf_sys.so';

So far so good. I've created a simple PHP script which prints out the time of execution and exits code status 0:

<?php

$date = date('Y-m-d h:i:s');
$text = sprintf("[%s] Execution\n", $date);
echo $text;
exit(0);

php is in /usr/bin/php

mysql> select sys_exec('/usr/bin/php /tmp/test/test.php');
+---------------------------------------------+
| sys_exec('/usr/bin/php /tmp/test/test.php') |
+---------------------------------------------+
|                                         0 |
+---------------------------------------------+
1 row in set (0.07 sec)

(fine). If I change the exit code to 1 (exit(1);), this is the output:

mysql> select sys_exec('/usr/bin/php /tmp/test/test.php');
+---------------------------------------------+
| sys_exec('/usr/bin/php /tmp/test/test.php') |
+---------------------------------------------+
|                                         256 |
+---------------------------------------------+
1 row in set (0.07 sec)

256? But let's return to exit 0 and try out sys_exec:

mysql> select sys_eval('/usr/bin/php /tmp/test/test.php');
+---------------------------------------------+
| sys_eval('/usr/bin/php /tmp/test/test.php') |
+---------------------------------------------+
|                                        NULL |
+---------------------------------------------+
1 row in set (0.07 sec)

Note: /tmp/test has rwx permissions for all (ugo+rwx).

Let's try something easier:

mysql> select sys_eval('pwd');
+-----------------+
| sys_eval('pwd') |
+-----------------+
|            NULL |
+-----------------+
1 row in set (0.02 sec)

Is my compiled library... failing?

Out of memory when creating a procedure

After compiling, install.sh file asks a password for root user for execute sql file into database that create new functions. But when it trying this, error was occured: "ERROR 1041 (HY000) at line 29: Out of memory.
ERROR: unable to install the UDF".

Makefile compiles to wrong lib directrory

ERROR 1126 (HY000) at line 29: Can't open shared library 'lib_mysqludf_sys.so' (errno: 0 /usr/lib/mysql/plugin/lib_mysqludf_sys.so: cannot open shared object file: No such file or directory)

Seems impossible to pass a variable from trigger to cmd

Thanks for you plugin set, first of all.
My environment CentOS 7, MySQL 5.5, plugin lib_mysqludf_sys has installed and works properly.
But I can't pass a variable from trigger to cmd - may be a specific wrapper is needed ?
Please, see the trigger below
AFTER INSERT ON trig_test
FOR EACH ROW
BEGIN
DECLARE cmd CHAR(255);
DECLARE result CHAR(255);
DECLARE var INT;
SET @var = (SELECT MAX(ID) FROM trig_test) ;
-- // this line does not work, tested echo @var, echo "@var" etc - or empty or 0
SET cmd = CONCAT('echo "@var" >> /test/mysqltrigger.txt');
SET result = sys_exec(cmd);
-- // this line work OK
SET cmd = CONCAT('echo "test" >> /test/mysqltrigger.txt');
SET result = sys_exec(cmd);
-- // this line also work OK
INSERT INTO test (column1,column2) VALUES (@var,'test') ;
END;

Please, hint a solution if available,
Best regards,

OS user used by sys_exec

Hey, thanks for your great work
I used sys_exec to execute php code from mysql trigger
What OS user (root or mysql user) that used by this function ? because, sometimes it gives me an error Permission denied when I try to create file on some root folder but it doesn't give me error when create on /tmp/ folder

mysql crashed with mariadb 10.3

While trying: select sys_eval('pwd');

mysql crash:

Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 444
Server version: 10.3.23-MariaDB-0+deb9u1 Debian 9.13

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> select sys_eval('pwd');
ERROR 2013 (HY000): Lost connection to MySQL server during query
MariaDB [(none)]> Bye

in mariadb logs i can read:

thread_count=18
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 3227170 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7fcd5018d4f8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7fcd3a947cf8 thread_stack 0x49000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55d1a3fa3d1e]
/usr/sbin/mysqld(handle_fatal_signal+0x3af)[0x55d1a3a89c5f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0)[0x7fcec255a0e0]
/lib/x86_64-linux-gnu/libc.so.6(fgets+0x1b)[0x7fcec0a8035b]
/usr/lib/x86_64-linux-gnu/mariadb19/plugin/lib_mysqludf_sys.so(sys_eval+0xed)[0x7fce3c015346]
/usr/sbin/mysqld(ZN11udf_handler7val_strEP6StringS1+0x62)[0x55d1a3aee3e2]
/usr/sbin/mysqld(_ZN17Item_func_udf_str7val_strEP6String+0x1c)[0x55d1a3aee4bc]
/usr/sbin/mysqld(_ZNK12Type_handler13Item_send_strEP4ItemP8ProtocolP8st_value+0x1c)[0x55d1a39e462c]
/usr/sbin/mysqld(_ZN8Protocol19send_result_set_rowEP4ListI4ItemE+0xc1)[0x55d1a3810401]
/usr/sbin/mysqld(_ZN11select_send9send_dataER4ListI4ItemE+0x53)[0x55d1a3872b23]
/usr/sbin/mysqld(_ZN4JOIN10exec_innerEv+0x908)[0x55d1a3908e88]
/usr/sbin/mysqld(_ZN4JOIN4execEv+0x33)[0x55d1a3909203]
/usr/sbin/mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_resultP18st_select_lex_unitP13st_select_lex+0xef)[0x55d1a390786f]
/usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0xf8)[0x55d1a39081a8]
/usr/sbin/mysqld(+0x4a7d9e)[0x55d1a37d3d9e]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x2887)[0x55d1a38b4657]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x1ea)[0x55d1a38ba26a]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0xee1)[0x55d1a38bbea1]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x115)[0x55d1a38bd955]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x262)[0x55d1a398b2a2]
/usr/sbin/mysqld(handle_one_connection+0x3d)[0x55d1a398b3ed]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4)[0x7fcec25504a4]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fcec0b01d0f]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7fcd5019b790): select sys_eval('pwd')
Connection ID (thread ID): 46
Status: NOT_KILLED

sys_exec neither showing error nor working

I have installed sys_exec function in mysql but though the function is not returning any error or warning but not executing the command as well.

DELIMITER $$

DROP PROCEDURE IF EXISTS debug_msg$$
DROP PROCEDURE IF EXISTS sessionActivity$$

CREATE PROCEDURE debug_msg(enabled INTEGER, msg VARCHAR(255))
BEGIN
  IF enabled THEN BEGIN
    select concat("** ", msg) AS '** DEBUG:';
  END; END IF;
END $$

CREATE PROCEDURE sessionActivity(id BIGINT)
BEGIN
  IF id THEN BEGIN
   DECLARE cmd CHAR(255);
   DECLARE result CHAR(255);
   SET cmd = CONCAT('cp /home/omoto/Desktop/Issues.png /home/omoto');
   SET result = sys_exec(cmd);
   select result;
   #####SET result = sys_exec(cmd);
   call debug_msg(TRUE,cmd);
   #####call debug_msg(TRUE,result);
  END; END IF;
END$$

DELIMITER ;

and after debug with
CALL sessionActivity(1);

I got
# ** DEBUG: ** cp /home/omoto/Desktop/Issues.png /home/omoto

needs -fPIC later gcc

/usr/bin/ld: /tmp/ccFZ9hBW.o: relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC

sys_eval crash mysql and sys_exec do nothing

Hi,

I try to use this plugin on a 5.5.42-MariaDB, Thus I compiled (gcc -DMYSQL_DYNAMIC_PLUGIN -fPIC -Wall -I/usr/include/mysql -shared lib_mysqludf_sys.c -o /usr/lib/mysql/plugin/lib_mysqludf_sys.so) the .so and placed it in the right folder then created the function like this:

CREATE FUNCTION sys_exec RETURNS int SONAME 'lib_mysqludf_sys.so';
CREATE FUNCTION sys_eval RETURNS string SONAME 'lib_mysqludf_sys.so';

No errors, but:
MariaDB [(none)]> select sys_exec('pwd');
+-----------------+
| sys_exec('pwd') |
+-----------------+
| -1 |
+-----------------+
1 row in set (0.01 sec)

and

MariaDB [(none)]> SELECT sys_eval('id');
ERROR 2013 (HY000): Lost connection to MySQL server during query

With this in the syslog right after the sys_eval:
mysqld: 160108 14:43:29 [ERROR] mysqld got signal 11 ;
mysqld: This could be because you hit a bug. It is also possible that this binary
mysqld: or one of the libraries it was linked against is corrupt, improperly built,
mysqld: or misconfigured. This error can also be caused by malfunctioning hardware.

Any idea ?

sys_eval() not freeing memory and can cause crashes

Here is a patch to the above issues with sys_evail()

I found the issues while checking the function with valgrind.

*** org/lib_mysqludf_sys-master/lib_mysqludf_sys.c Thu Feb 21 02:39:07 2013
--- ./lib_mysqludf_sys.c Fri Jan 13 15:31:45 2023


*** 54,60 ****

#define LIBVERSION "lib_mysqludf_sys version 0.0.3"

! #ifdef WIN
#define SETENV(name,value) SetEnvironmentVariable(name,value);
#else
#define SETENV(name,value) setenv(name,value,1);
--- 54,60 ----

#define LIBVERSION "lib_mysqludf_sys version 0.0.3"

! #ifdef WIN64
#define SETENV(name,value) SetEnvironmentVariable(name,value);
#else
#define SETENV(name,value) setenv(name,value,1);


*** 373,378 ****
--- 373,380 ----
unsigned int i=0;
if(args->arg_count == 1
&& args->arg_type[i]==STRING_RESULT){

  •       initid->max_length= 65535;
    
  •       initid->ptr= malloc(65535);
      return 0;
    
    } else {
    strcpy(

*** 385,390 ****
--- 387,394 ----
void sys_eval_deinit(
UDF_INIT *initid
){

  • free(initid->ptr);
  • initid->ptr= 0;
    }
    char* sys_eval(
    UDF_INIT *initid

*** 395,424 ****
, char *error
){
FILE *pipe;
! char line[1024];
! unsigned long outlen, linelen;

! result = malloc(1);
! outlen = 0;

pipe = popen(args->args[0], "r");

while (fgets(line, sizeof(line), pipe) != NULL) {

! linelen = strlen(line);
! result = realloc(result, outlen + linelen);
! strncpy(result + outlen, line, linelen);
! outlen = outlen + linelen;
}

pclose(pipe);

! if (!(*result) || result == NULL) {
! *is_null = 1;
! } else {
! result[outlen] = 0x00;
! *length = strlen(result);
! }
!
return result;
}

--- 399,424 ----
, char *error
){
FILE *pipe;
! char line[1024], *out= result;
! unsigned long outlen;

! if (result == 0) /* Allocation failed */
! {
! *is_null = 1;
! return 0;
! }

  • outlen = 0;
    pipe = popen(args->args[0], "r");

    while (fgets(line, sizeof(line), pipe) != NULL) {
    ! out= strnmov(out, line, initid->max_length - outlen);
    ! outlen = out - result;
    }

    pclose(pipe);

! *length= outlen;
return result;
}

Can't install on Ubuntu 16.04.5 LTS "Unable to locate package libmysqlclient15-dev"

I am running Ubuntu 16.04.5 LTS, MySQL 14.14 Distrib 5.7.22, for Linux (x86_64)

I have tried the install.sh script and I get the error:

ERROR: You need libmysqlclient development software installed
to be able to compile this UDF, on Debian/Ubuntu just run:
apt-get install libmysqlclient15-dev

But when I try to install that I get "Unable to locate package libmysqlclient15-dev"

When I try to install with out the "15" in the name I get a message saying I have the latest version:
"libmysqlclient-dev is already the newest version (5.7.22-1ubuntu14.04)"

Any thoughts on how to fix this issue?

ERROR 1126 (HY000) at line 29: Can't open shared library 'lib_mysqludf_sys.so' (errno: 11 /usr/local/mysql/lib/plugin/lib_mysqludf_sys.so: wrong ELF class: ELFCLASS32)

lib_mysqludf_sys]# ./install.sh
Compiling the MySQL UDF
gcc -m64 -fPIC -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o /usr/lib64/mysql/plugin//lib_mysqludf_sys.so
MySQL UDF compiled successfully

Please provide your MySQL root password
Enter password:
ERROR 1126 (HY000) at line 29: Can't open shared library 'lib_mysqludf_sys.so' (errno: 11 /usr/local/mysql/lib/plugin/lib_mysqludf_sys.so: wrong ELF class: ELFCLASS32)
ERROR: unable to install the UDF
[root@xxxxxxx lib_mysqludf_sys]#

Running under Ubuntu 64

I'm trying it with Ubuntu 64 without success...

My MakeFile I've changed to this:

LIBDIR=/usr/lib/mysql/plugin

install:
    gcc -Wall -m64 -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o $(LIBDIR)/lib_mysqludf_sys.so -fPIC

I've added this in /etc/mysql/my.conf

plugin_dir      = /usr/lib/mysql/plugin

Changed the permissions of /usr/lib/mysql/plugin

$ sudo chown mysql: mysql -R /var/lib/mysql/plugin 

Restarted mysql

sudo service mysql restart

When I run you example command:

mysql> SELECT sys_exec ('touch /var/lib/mysql/test.txt ');
+---------------------------------------------+
| sys_exec ('touch /var/lib/mysql/test.txt ') |
+---------------------------------------------+
| 32512 |
+---------------------------------------------+
1 row in set (0.00 sec)

or

mysql> SELECT sys_eval('id');
+----------------+
| sys_eval('id') |
+----------------+
| NULL           |
+----------------+
1 row in set (0.40 sec)

or

mysql> SELECT sys_eval('cp /home/cassiano/Desktop/index.html /home/cassiano/');
+------------------------------------------------------------------+
| sys_eval('cp /home/cassiano/Desktop/index.html /home/cassiano/') |
+------------------------------------------------------------------+
|                                                                  |
+------------------------------------------------------------------+
1 row in set (0.02 sec)

Nothing happens...
I've already checked /var/log/mysql/error.log and it is empty

Any ideas?

Can't find symbol 'lib_mysqludf_sys_info' in library

Hello there,

I have gone through all the things and the installtion was successfull on my other server but when it came for my prodution server it through the error
Can't find symbol 'lib_mysqludf_sys_info' in library.
when i try to create the functions.

No paths allowed for shared library (At installation)

Hi All,
I am using:
MySQL 5.1.73 on Red Hat Enterprise Linux Server release 6.8 (Santiago)
When trying to install, I get following error : ERROR 1124 (HY000): No paths allowed for shared library
Has anyone faced the same issue and managed to find a fix.
Any input would be appreciated.
Thanks,
Alassane

64bits recompilation fails. Error with header files

Hi,

Experiencing issue with 64bits recompilation (Red Hat Enterprise Linux Server release 6.8).

Command attempted (edited from Makefile):
gcc -m64 -fPIC -Wall -I/usr/include/mysql -I. -shared lib_mysqludf_sys.c -o /usr/lib/mysql/plugin/lib_mysqludf_sys.so -L/usr/lib64/libstdc++.so.6.0.13

Error received:
lib_mysqludf_sys.c:40:23: error: my_global.h: No such file or directory
lib_mysqludf_sys.c:41:20: error: my_sys.h: No such file or directory
lib_mysqludf_sys.c:43:19: error: mysql.h: No such file or directory
lib_mysqludf_sys.c:44:21: error: m_ctype.h: No such file or directory
lib_mysqludf_sys.c:45:22: error: m_string.h: No such file or directory
make: *** [install] Error 1

Any idea where issue could be coming from?

One feedback from different forum suggested change of libraries at mysql end? Looking into by trying to install/use udf shipped with mysql?
Looking into it.

Any other suggestion if you have experienced the same will be of help.

Thanks

Need root to install

Hi there, people!

I was wondering, if 'mysqludfsys' needs root's permission to be installed, why in the hell I would need this program to "become" a root through MySQL commands?

Would be easier whether we just command: $sudo su ?

Sudo command to install programs in owned server is not a trivial thing to be done during an invasion. So, if I have "sudo" permissions, I go to the system with it and not with mysqludfsys stuffs. Sorry!

need an update for MariaDB 10

Hi guys.

Appreciate a ton of awesome works done. This is an awesome tool.

When I tried to install this on a CentOS server that have installed MariaDB 10.2+, it failed and I have figured out the reasons.

Finally this is fixed in the devel branch of mysqlclient but not yet released, it was due to a recent change in MariaDB 10.2.8 that does change the location of the server headers to a /server folder to avoid colliding headers from server and client.

from https://stackoverflow.com/questions/45905026/error-installing-mysqlclient-with-mariadb-10-2

This needs to be fixed on the side of codes. Hope my founding is helpful for any contributor.

Will we have an update for this change?

fatal error: my_atomic.h: No such file or directory

./install.sh Compiling the MySQL UDF gcc -Wall -I/usr/include/mysql/server -I. -shared lib_mysqludf_sys.c -o /usr/lib/lib_mysqludf_sys.so In file included from /usr/include/mysql/server/my_sys.h:34, from lib_mysqludf_sys.c:41: /usr/include/mysql/server/my_pthread.h:26:10: fatal error: my_atomic.h: No such file or directory #include <my_atomic.h> ^~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:6: install] Error 1 ERROR: You need libmysqlclient development software installed to be able to compile this UDF, on Debian/Ubuntu just run: apt-get install libmysqlclient15-dev

the following libs are already installed:

dpkg -l|grep --color libmysql ii default-libmysqlclient-dev:amd64 1.0.5 amd64 MySQL d atabase development files (metapackage) ii libmysqlclient18 1:10.4.11+maria~buster amd64 Virtual package to satisfy external libmysqlclient18 depends ii libmysqlcppconn-dev:amd64 1.1.9-4+b1 amd64 MySQL C onnector for C++ (development files) ii libmysqlcppconn7v5:amd64 1.1.9-4+b1 amd64 MySQL C onnector for C++ (library)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.