<p>i am working on bitcoin code, my aim is to move blockchain data to relational db but i am not able to resolve mysql dependency for different platform, platform includes mac and ubuntu. I have tried giving static and dynamic dependency but both of those things not working at all.</p>

<pre><code> [  --with-mysql=&lt;path&gt;     root directory path of MySQL installation],
    [MYSQL_lib_check="$with_mysql/lib/mysql $with_mysql/lib"
MYSQL_inc_check="$with_mysql/include/mysql"],
    [MYSQL_lib_check="/usr/local/mysql/lib/mysql /usr/local/lib/mysql /opt/mysql/lib/mysql /usr/lib/mysql /usr/local/mysql/lib /usr/local/lib /opt/mysql/lib /usr/lib"
MYSQL_inc_check="/usr/local/mysql/include/mysql /usr/local/include/mysql /opt/mysql/include/mysql /usr/include/mysql"])

AC_ARG_WITH(mysql-lib,
    [  --with-mysql-lib=&lt;path&gt; directory path of MySQL library installation],
    [MYSQL_lib_check=$with_mysql/lib/mysql])

AC_ARG_WITH(mysql-include,
    [  --with-mysql-include=&lt;path&gt;
                          directory path of MySQL header installation],
    [MYSQL_inc_check=$with_mysql/include/mysql])

AC_MSG_CHECKING([for MySQL library directory])
MYSQL_libdir=
for m in $MYSQL_lib_check; do
        if test -d "$m" &amp;&amp; \
       (test -f "$m/libmysqlclient.so" || test -f "$m/libmysqlclient.a")
        then
                MYSQL_libdir=$m
                break
        fi
done
</code></pre>

<p>while configuring i was trying to gave path of installation directory i.e ./configure --with-mysql=/path it configured successfully but when i execute make command it throws exception "_get_driver_instance", referenced from: makeConnection() in libbitcoin_wallet.a(libbitcoin_wallet_a-walletdb.o)</p>

<p>might be i am not on right track, help me if you have any idea regarding make file system</p>

<p>any help is appreciable, thanks.</p>

CC BY-SA 4.0
2019-05-18T04:20:24.953Z
Why do you want to do this? There’s no performance or really any value in doing so.
Claris
CC BY-SA 4.0
2019-05-18T11:12:59.370Z
its just for learning purpose to manage huge amount of records through DBMS.
Talha Malik
CC BY-SA 4.0
2019-05-18T14:29:37.060Z
Just in general, you'l struggle with this. The data is absolutely colossal and largely a single key value store. Almost the entire CPU time of bitcoin core other than ECDSA validation is doing key insertions.
Claris
CC BY-SA 4.0
2019-05-18T17:05:14.140Z
i am going to do insertion and related stuff after block validation is done
Talha Malik
<bitcoind><c++><mysql>
add mysql dependency configure.ac bitcoin
Talha Malik
# add mysql dependency configure.ac bitcoin

(Asked by: username_0 on 2019-05-17)

i am working on bitcoin code, my aim is to move blockchain data to relational db but i am not able to resolve mysql dependency for different platform, platform includes mac and ubuntu. I have tried giving static and dynamic dependency but both of those things not working at all.
 [  --with-mysql=     root directory path of MySQL installation],
    [MYSQL_lib_check="$with_mysql/lib/mysql $with_mysql/lib"
MYSQL_inc_check="$with_mysql/include/mysql"],
    [MYSQL_lib_check="/usr/local/mysql/lib/mysql /usr/local/lib/mysql /opt/mysql/lib/mysql /usr/lib/mysql /usr/local/mysql/lib /usr/local/lib /opt/mysql/lib /usr/lib"
MYSQL_inc_check="/usr/local/mysql/include/mysql /usr/local/include/mysql /opt/mysql/include/mysql /usr/include/mysql"])

AC_ARG_WITH(mysql-lib,
    [  --with-mysql-lib= directory path of MySQL library installation],
    [MYSQL_lib_check=$with_mysql/lib/mysql])

AC_ARG_WITH(mysql-include,
    [  --with-mysql-include=
                          directory path of MySQL header installation],
    [MYSQL_inc_check=$with_mysql/include/mysql])

AC_MSG_CHECKING([for MySQL library directory])
MYSQL_libdir=
for m in $MYSQL_lib_check; do
        if test -d "$m" && \
       (test -f "$m/libmysqlclient.so" || test -f "$m/libmysqlclient.a")
        then
                MYSQL_libdir=$m
                break
        fi
done

while configuring i was trying to gave path of installation directory i.e ./configure --with-mysql=/path it configured successfully but when i execute make command it throws exception "_get_driver_instance", referenced from: makeConnection() in libbitcoin_wallet.a(libbitcoin_wallet_a-walletdb.o)
might be i am not on right track, help me if you have any idea regarding make file system
any help is appreciable, thanks.

**Tags:** bitcoind, c++, mysql

> **Comments:**
> **username_1**: Why do you want to do this? There’s no performance or really any value in doing so.  
> **username_0**: its just for learning purpose to manage huge amount of records through DBMS.  
> **username_1**: Just in general, you'l struggle with this. The data is absolutely colossal and largely a single key value store. Almost the entire CPU time of bitcoin core other than ECDSA validation is doing key insertions.  
> **username_0**: i am going to do insertion and related stuff after block validation is done  

---

## 0 answers

