After the installation compiled Sysbench, error.
Error message:
[Email protected] dongbo]# sysbench-v
Sysbench:error while loading shared libraries:libmysqlclient.so.18:cannot open Shared object file:no such file or dire Ctory
Workaround:
1.
[Email protected] dongbo]# ls-l/usr/local/mysql/lib/libmysqlclient.so.18*
lrwxrwxrwx. 1 MySQL MySQL 19:16/usr/local/mysql/lib/libmysqlclient.so.18-libmysqlclient.so.18.0.0
-rwxr-xr-x.1 MySQL MySQL 6892140 19:16/usr/local/mysql/lib/libmysqlclient.so.18.0.0
Files are present, using a soft link to connect;
[Email protected] dongbo]# ln-s/usr/local/mysql/lib/libmysqlclient.so.18/usr/lib/
If the test is available at this point, the second step is not possible.
2.
[Email protected] dongbo]# vi/etc/ld.so.conf
At the end add: Export ld_library_path=/usr/local/mysql/lib mysql installation directory.
[Email protected] dongbo]# Ldconfig
[Email protected] dongbo]# sysbench-v
Unknown command:-V.
Usage:
Sysbench [general-options] ...--test=<test-name> [test-options] ... command
General Options:
--num-threads=n number of threads to use [1]
--max-requests=n limit for total number of requests [10000]
--max-time=n limit for total execution time in seconds [0]
--forced-shutdown=string amount of time to wait after--max-time before forcing shutdown [off]
--thread-stack-size=size size of stack per thread [64K]
--tx-rate=n target Transaction rate (TPS) [0]
--tx-jitter=n target transaction variation, in microseconds [0]
--report-interval=n periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0]
--test=string Test to run
--debug=[on|off] Print more debugging info [off]
--validate=[on|off] Perform validation checks where possible [off]
--help=[on|off] Print help and exit
--version=[on|off] Print version and exit [off]
--rand-init=[on|off] Initialize random number generator [off]
--rand-type=string random numbers distribution {uniform,gaussian,special} [special]
--rand-spec-iter=n number of iterations used for numbers generation [12]
--rand-spec-pct=n percentage of values to being treated as ' special ' (for special distribution) [1]
--rand-spec-res=n percentage of ' special ' values to use (for special distribution) [75]
--rand-seed=n seed for random number generator, ignored when 0 [0]
Log options:
--verbosity=n verbosity Level {5-debug, 0-only critical Messages} [3]
--percentile=n percentile rank of query response times to count [95]
Compiled-in Tests:
Fileio-file I/O test
CPU-CPU Performance Test
Memory-memory Functions Speed Test
Threads-threads Subsystem Performance Test
Mutex-mutex Performance Test
Commands:prepare Run Cleanup Help version
See "Sysbench--test=<name> Help" for a list of options for each test.
At this point you can basically determine the problem resolution.
。
This article is from the "mysql_db" blog, make sure to keep this source http://mysqldb.blog.51cto.com/10264653/1687969
Sysbench:error while loading shared Libraries:libmysqlclient.so.18:cannot open Shared object file