-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fedora 20. Plugin doesn't work #5
Comments
The plugin works fine, probably your environment is not well configured. Make the tests in /tmp. |
Yes, you are right. All tests work in /tmp. Thanks. |
Hi @CrazyNoob could you paste a test like @samshm ? |
Hi @daper thanks for the quick reply I ended up fixing the problem with a mix of your answer https://github.com/mysqludf/lib_mysqludf_sys/issues/4#issuecomment-48470107 Nevertheless, could you provide an example on your statement "probably your environment is not well configured.". What would be a badly configured environment? What would a good one be? |
You are right... It's not a good answer. I only meant permissions to read, write and execute. There aren't a good or bad environment. Sorry :) I'm glad you were able to solve it. |
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
The text was updated successfully, but these errors were encountered: