In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "how to solve the sphinx startup error report: sql_connect: failed to load libmysqlclient (or libmariadb)", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to solve the sphinx startup error report: sql_connect: failed to load libmysqlclient (or libmariadb)"!
problem
After centos 7 downloads shpinx 3, start. / bin/indexer or. / bin/searchd to report an error:
ERROR: index 'attr_node': sql_connect: failed to load libmysqlclient (or libmariadb) (DSN=mysql://apps:***@localhost:3306/phalapi).
Solution 1. Try to add a soft link
# find /-name 'libmysqlclient*'
/ usr/lib64/mysql/libmysqlclient.so.18
/ usr/lib64/mysql/libmysqlclient.so.18.0.0
# ll / usr/lib64/mysql/libmysqlclient.so.18*
# ln-s / usr/lib64/mysql/libmysqlclient.so.18.0.0 / usr/lib/libmysqlclient.so
But it turns out I can't.
2. Try to add environment variables
# vim / etc/ld.so.conf
Export LD_LIBRARY_PATH=/usr/lib64/mysql:$LD_LIBRARY_PATH
It is not possible to execute the startup script again after source.
3. Modify / etc/ld.so.conf, it's OK!
Execute:
[root@localhost sphinx-3.1.1] # echo "/ usr/lib64/mysql" > > / etc/ld.so.conf & & ldconfig
As a result, it worked! Index building and startup are successful!
[root@localhost sphinx-3.1.1] #. / bin/indexer-all
Sphinx 3.1.1 (commit 612d99f)
Copyright (c) 2001-2018, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Using config file'. / sphinx.conf'...
WARNING: key 'docinfo' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'dict' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'mva_updates_pool' was permanently removed from Sphinx configuration. Refer to documentation for details.
Indexing index 'attr_node'...
Collected 10 docs, 0.0 MB
Sorted 0.0 Mhits, 100.0% done
Total 10 docs, 3.7 Kb
Total 0.0 sec, 149.3 Kb/sec, 400 docs/sec
[root@localhost sphinx-3.1.1] #. / bin/searchd
Sphinx 3.1.1 (commit 612d99f)
Copyright (c) 2001-2018, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Using config file'. / sphinx.conf'...
WARNING: key 'docinfo' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'dict' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'mva_updates_pool' was permanently removed from Sphinx configuration. Refer to documentation for details.
Listening on all interfaces, port=9312
Listening on all interfaces, port=9306
Precaching index 'attr_node'
Precached 1 indexes in 0.007 sec
At this point, I believe you have a deeper understanding of "how to solve the problem of sphinx startup error: sql_connect: failed to load libmysqlclient (or libmariadb)". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.