Link to home
Start Free TrialLog in
Avatar of Ludwig Diehl
Ludwig DiehlFlag for Peru

asked on

Mysql Thread-safe

I am trying to compile Mysql 5.6 with thread-safe enabled, however I cannot get it working. I need that because I'm trying to configure Bacula with "batch insert" enabled.
Does anyone know how to achieve this?
Avatar of gheist
gheist
Flag of Belgium image

Install distribution MySQL and bacula packages.
Avatar of Ludwig Diehl

ASKER

No matter how I cannot install Mysql in thread safe mode. I have configured and compile bacula with batch insert enabled.
What system do you use?
How are you trying to install MySQL? apt-get? msiexec?
What parameters you use for"thread safe mode"?
Linux Opensuse 13.1. Also tried with Centos 7.
I am using
./configure --enable-thread-safe-client

Open in new window

as described here
Your instructions are for MySQL v4. Just install mysql-devel package and build against default system mysql or mariadb client
Unfortunately I get this:

   Large file support:       yes
   Bacula conio support:     no
   readline support:         no
   TCP Wrappers support:     no
   TLS support:              yes
   Encryption support:       yes
   ZLIB support:             yes
   LZO support:              yes
   enable-smartalloc:        yes
   enable-lockmgr:           no
   bat support:              no
   client-only:              no
   build-dird:               yes
   build-stored:             yes
   Plugin support:           yes
   AFS support:              no
   ACL support:              no
   XATTR support:            yes
   systemd support:          no
   Batch insert enabled:     None

Even when I configure it with "--enable-batch-insert"
How that is relevant to mysql v5 build rejecting experimantal v4 parameters that became defaults?
What should I do then?
You have sufficient mysql shipped with your system.


Try ../configure --with-mysql=/usr

On OpenSUSE 13.2 I get this:
Configuration on Sun Sep  6 20:15:45 CEST 2015:

   Host:                     x86_64-unknown-linux-gnu -- suse 13.2
   Bacula version:           Bacula 7.2.0 (14 August 2015)
   Source code location:     .
   Install binaries:         /sbin
   Install libraries:        /lib64
   Install config files:     /etc/bacula
   Scripts directory:        /etc/bacula
   Archive directory:        /tmp
   Working directory:        /opt/bacula/working
   PID directory:            /var/run
   Subsys directory:         /var/lock/subsys
   Man directory:            ${datarootdir}/man
   Data directory:           /usr/share
   Plugin directory:         /lib64
   C Compiler:               gcc Linux)
   C++ Compiler:             /usr/bin/g++ Linux)
   Compiler flags:            -g -O2 -Wall -fno-strict-aliasing -fno-exceptions -fno-rtti
   Linker flags:              
   Libraries:                -lpthread -ldl -ldl 
   Statically Linked Tools:  no
   Statically Linked FD:     no
   Statically Linked SD:     no
   Statically Linked DIR:    no
   Statically Linked CONS:   no
   Database backends:        MySQL
   Database port:             
   Database name:            bacula
   Database user:            bacula

   Job Output Email:         root@localhost
   Traceback Email:          root@localhost
   SMTP Host Address:        localhost

   Director Port:            9101
   File daemon Port:         9102
   Storage daemon Port:      9103

   Director User:            
   Director Group:           
   Storage Daemon User:      
   Storage DaemonGroup:      
   File Daemon User:         
   File Daemon Group:        

   Large file support:       yes
   Bacula conio support:     yes -ltinfo
   readline support:         no 
   TCP Wrappers support:     no 
   TLS support:              yes
   Encryption support:       yes
   ZLIB support:             yes
   LZO support:              no
   enable-smartalloc:        yes
   enable-lockmgr:           no
   bat support:              no
   client-only:              no
   build-dird:               yes
   build-stored:             yes
   Plugin support:           yes
   AFS support:              no
   ACL support:              no
   XATTR support:            yes
   systemd support:          no 
   Batch insert enabled:     MySQL

Open in new window

I got this:

Configuration on Mon Sep  7 12:40:08 PET 2015:

   Host:                     x86_64-unknown-linux-gnu -- suse 13.1
   Bacula version:           Bacula 7.2.0 (14 August 2015)
   Source code location:     .
   Install binaries:         /sbin
   Install libraries:        /lib64
   Install config files:     /etc/bacula
   Scripts directory:        /etc/bacula
   Archive directory:        /tmp
   Working directory:        /opt/bacula/working
   PID directory:            /var/run
   Subsys directory:         /var/run/subsys
   Man directory:            ${datarootdir}/man
   Data directory:           /usr/share
   Plugin directory:         /lib64
   C Compiler:               gcc Linux)
   C++ Compiler:             /usr/bin/g++ Linux)
   Compiler flags:            -g -O2 -Wall -fno-strict-aliasing -fno-exceptions -fno-rtti
   Linker flags:
   Libraries:                -lpthread -ldl -ldl
   Statically Linked Tools:  no
   Statically Linked FD:     no
   Statically Linked SD:     no
   Statically Linked DIR:    no
   Statically Linked CONS:   no
   Database backends:        MySQL
   Database port:
   Database name:            bacula
   Database user:            bacula

   Job Output Email:         root@localhost
   Traceback Email:          root@localhost
   SMTP Host Address:        localhost

   Director Port:            9101
   File daemon Port:         9102
   Storage daemon Port:      9103

   Director User:
   Director Group:
   Storage Daemon User:
   Storage DaemonGroup:
   File Daemon User:
   File Daemon Group:

   Large file support:       yes
   Bacula conio support:     no
   readline support:         no
   TCP Wrappers support:     no
   TLS support:              yes
   Encryption support:       yes
   ZLIB support:             yes
   LZO support:              yes
   enable-smartalloc:        yes
   enable-lockmgr:           no
   bat support:              no
   client-only:              no
   build-dird:               yes
   build-stored:             yes
   Plugin support:           yes
   AFS support:              no
   ACL support:              no
   XATTR support:            yes
   systemd support:          no
   Batch insert enabled:     None

Open in new window


MYSQL version:
mysql  Ver 14.14 Distrib 5.6.22, for Linux (x86_64) using  EditLine wrapper

Open in new window

Where did you dig up that MySQL client? Default is 5.5.44 and there is 5.6.25 client libraries provided if you want to install OpenSUSE 13.2 or SLES 12 packages.
Please install mysql-devel and try again. That client is absolutely 100% working.
I want to use OpenSuSE 13.1 because it is Evergreen. Using the update repo I get these versions:

 zypper se -s mysql-communi
Loading repository data...
Reading installed packages...

S | Name                                 | Type       | Version      | Arch   | Repository
--+--------------------------------------+------------+--------------+--------+---------------------
  | mysql-community-server               | package    | 5.6.25-7.7.2 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server               | package    | 5.6.25-7.4.1 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server               | package    | 5.6.25-7.7.2 | i586   | openSUSE-13.1-Update
  | mysql-community-server               | package    | 5.6.25-7.4.1 | i586   | openSUSE-13.1-Update
  | mysql-community-server               | srcpackage | 5.6.25-7.7.2 | noarch | openSUSE-13.1-Update
  | mysql-community-server               | srcpackage | 5.6.25-7.4.1 | noarch | openSUSE-13.1-Update
  | mysql-community-server-bench         | package    | 5.6.25-7.7.2 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-bench         | package    | 5.6.25-7.4.1 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-bench         | package    | 5.6.25-7.7.2 | i586   | openSUSE-13.1-Update
  | mysql-community-server-bench         | package    | 5.6.25-7.4.1 | i586   | openSUSE-13.1-Update
  | mysql-community-server-client        | package    | 5.6.25-7.7.2 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-client        | package    | 5.6.25-7.4.1 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-client        | package    | 5.6.25-7.7.2 | i586   | openSUSE-13.1-Update
  | mysql-community-server-client        | package    | 5.6.25-7.4.1 | i586   | openSUSE-13.1-Update
  | mysql-community-server-errormessages | package    | 5.6.25-7.7.2 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-errormessages | package    | 5.6.25-7.4.1 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-errormessages | package    | 5.6.25-7.7.2 | i586   | openSUSE-13.1-Update
  | mysql-community-server-errormessages | package    | 5.6.25-7.4.1 | i586   | openSUSE-13.1-Update
  | mysql-community-server-test          | package    | 5.6.25-7.7.2 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-test          | package    | 5.6.25-7.4.1 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-test          | package    | 5.6.25-7.7.2 | i586   | openSUSE-13.1-Update
  | mysql-community-server-test          | package    | 5.6.25-7.4.1 | i586   | openSUSE-13.1-Update
  | mysql-community-server-tools         | package    | 5.6.25-7.7.2 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-tools         | package    | 5.6.25-7.4.1 | x86_64 | openSUSE-13.1-Update
  | mysql-community-server-tools         | package    | 5.6.25-7.7.2 | i586   | openSUSE-13.1-Update
  | mysql-community-server-tools         | package    | 5.6.25-7.4.1 | i586   | openSUSE-13.1-Update

Open in new window

This:
zypper se libmysql
Loading repository data...
Reading installed packages...

S | Name                  | Summary                                                               | Type   
--+-----------------------+-----------------------------------------------------------------------+--------
i | libmysql56client18    | Shared Libraries for MySQL Community Server                           | package
  | libmysql56client_r18  | Shared Libraries for MySQL Community Server                           | package
[b]i | libmysqlclient-devel[/b]  | MariaDB development header files and libraries                        | package
i | libmysqlclient18      | Shared Libraries for MariaDB                                          | package
i | libmysqlclient_r18    | Shared Libraries for MariaDB                                          | package
  | libmysqlcppconn-devel | Development files for MySQL Connector/C++                             | package
  | libmysqlcppconn6      | MySQL Connector/C++: Standardized database driver for C++ development | package
  | libmysqld-devel       | MariaDB embedded server development files                             | package
  | libmysqld18           | MariaDB embedded server development files                             | package

Open in new window

It shows you have mariadb installed. Should I try using mariadb instead?
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It really worked!. Thanks!
welcome.