In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains the "crontab does not execute the mysql script solution", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "crontab does not implement the mysql script solution" bar!
Cat / root/myadmin/test.sh
#! / bin/sh
PATH=/usr/local/service/mysql-3306/bin:$PATH
Export PATH
Echo "test test createuid"
Ginftool= "/ usr/local/service/mysql-3306/bin/mysql-- socket=/usr/local/service/mysql-3306/mysql.sock-- database=ginf_db"
$ginftool-e "select now ();"
Echo "end"
Find sql statements that cannot be found in crontab, but it's okay to execute them directly on the command line!
What's going on?
Check tail-n 20 root under / var/mail and find:
Test test createuid
/ usr/local/service/mysql-3306/bin/mysql: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object file: No such file or directory
End
Libmysqlclient.so.15 cannot be found in crontab, but it is found that this is under / usr/lib/mysql, not the default / usr/lib, there are two ways to solve it:
1. Ln-s / usr/lib/mysql/libmysqlclient.so.15.0.0 / usr/lib/libmysqlclient.so.15
2. Export
LD_LIBRARY_PATH=/usr/lib/mysql
Add it to the script!
Thank you for your reading, the above is the "crontab does not execute the mysql script solution" content, after the study of this article, I believe you do not execute the mysql script crontab solution to this problem has a deeper understanding, the specific use of the situation also needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.