数据库备份 - automysqlback- Error: Dependency programs are missing. mysql ……没有找到?

这篇具有很好参考价值的文章主要介绍了数据库备份 - automysqlback- Error: Dependency programs are missing. mysql ……没有找到?。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

数据库备份 - automysqlback- Error: Dependency programs are missing. mysql ……没有找到?

昨天在Linux 服务器上做了一个的mysql数据库备份,备份很重要关键时候能救命。具体怎么备份这边就不多说了。文件已经免费上传了

https://download.csdn.net/download/t631048648/88756279?spm=1001.2014.3001.5503

具体的操作想看潇湘隐者同学的文章

https://www.cnblogs.com/kerrycode/p/4648974.html

。## 标题Dependency programs are missing. mysql ……underfind.

今天上去查看备份目录发现是空的,这边贴上 /etc/automysqlbackup/automysqlbackup.conf 配置

	#version=3.0_rc2
	# DONT'T REMOVE THE PREVIOUS VERSION LINE!
	#
	# Uncomment to change the default values (shown after =)
	# WARNING:
	# This is not true for UMASK, CONFIG_prebackup and CONFIG_postbackup!!!
	#
	# Default values are stored in the script itself. Declarations in
	# /etc/automysqlbackup/automysqlbackup.conf will overwrite them. The
	# declarations in here will supersede all other.
	# Edit $PATH if mysql and mysqldump are not located in /usr/local/bin:/usr/bin:/bin:/usr/local/mysql/bin
    # Basic Settings
	# use encrypted authentication credentials
	# yes: through login path
	# no: through username and password
	#CONFIG_mysql_dump_encrypted_login='no'
	
	# since mysql 5.6.x connections can be stored securely
	# add your connection with
	# mysql_config_editor set --login-path=automysqldump --host=localhost --user=root --password
	# automysqldump is using the login-path "automysqldump" as default
	#CONFIG_mysql_dump_login_path='automysqldump'
	
	# Path to the mysql login configuration file.
	# Sometimes if the script is running in a cronjob, the mysql login configuration file cannot be located.
	# I.e. set it to '/root/.mylogin.cnf' or '/home/username/.mylogin.cnf'
	#CONFIG_mysql_dump_login_path_file=''
	
	# Username to access the MySQL server e.g. dbuser
	CONFIG_mysql_dump_username='root'
	
	# Password to access the MySQL server e.g. password
	CONFIG_mysql_dump_password='xxx'
	
	# Host name (or IP address) of MySQL server e.g localhost
	CONFIG_mysql_dump_host='xxxx'
	
	# "Friendly" host name of MySQL server to be used in email log
	# if unset or empty (default) will use CONFIG_mysql_dump_host instead
	#CONFIG_mysql_dump_host_friendly=''
	
	# Backup directory location e.g /backup
	CONFIG_backup_dir='/var/backup/db'
	
	# This is practically a moot point, since there is a fallback to the compression
	# functions without multicore support in the case that the multicore versions aren't
	# present in the system. Of course, if you have the latter installed, but don't want
	# to use them, just choose no here.
	# pigz -> gzip
	# pbzip2 -> bzip2
	# xz -T -> xz
	#CONFIG_multicore='yes'
	
	# Number of threads (= occupied cores) you want to use. You should - for the sake
	# of the stability of your system - not choose more than (#number of cores - 1).
	# Especially if the script is run in background by cron and the rest of your system
	# has already heavy load, setting this too high, might crash your system. Assuming
	# all systems have at least some sort of HyperThreading, the default is 2 threads.
	# If you wish to let pigz and pbzip2 autodetect or use their standards, set it to
	# 'auto'.
	#CONFIG_multicore_threads=2
	
	# Databases to backup
	
	# List of databases for Daily/Weekly Backup e.g. ( 'DB1' 'DB2' 'DB3' ... )
	# set to (), i.e. empty, if you want to backup all databases
	CONFIG_db_names=()
	# You can use
	#declare -a MDBNAMES=( "${DBNAMES[@]}" 'added entry1' 'added entry2' ... )
	# INSTEAD to copy the contents of $DBNAMES and add further entries (optional).
	
	# List of databases for Monthly Backups.
	# set to (), i.e. empty, if you want to backup all databases
	#CONFIG_db_month_names=()
	
	# List of DBNAMES to EXLUCDE if DBNAMES is empty, i.e. ().
	CONFIG_db_exclude=( 'performance_schema' 'information_schema' )
	
	# List of DBNAMES patterns to EXLUCDE if DBNAMES is empty, i.e. ().
	CONFIG_db_exclude_pattern=('blade')
	
	# List of tables to exclude, in the form db_name.table_name
	# You may use wildcards for the table names, i.e. 'mydb.a*' selects all tables starting with an 'a'.
	# However we only offer the wildcard '*', matching everything that could appear, which translates to the
	# '%' wildcard in mysql.
	CONFIG_table_exclude=('nonmotor.non_motor_pass*')
	
	
	# Advanced Settings
	
	# Rotation Settings
	
	# Which day do you want monthly backups? (01 to 31)
	# If the chosen day is greater than the last day of the month, it will be done
	# on the last day of the month.
	# Set to 0 to disable monthly backups.
	CONFIG_do_monthly='01'
	
	# Which day do you want weekly backups? (1 to 7 where 1 is Monday)
	# Set to 0 to disable weekly backups.
	CONFIG_do_weekly='5'
	
	# Set rotation of daily backups. VALUE*24hours
	# If you want to keep only today's backups, you could choose 1, i.e. everything older than 24hours will be removed.
	CONFIG_rotation_daily=6
	
	# Set rotation for weekly backups. VALUE*24hours
	CONFIG_rotation_weekly=35
	
	# Set rotation for monthly backups. VALUE*24hours
	CONFIG_rotation_monthly=150
	
	
	# Server Connection Settings
	
	# Set the port for the mysql connection
	CONFIG_mysql_dump_port=13306
	
	# Compress communications between backup server and MySQL server?
	#CONFIG_mysql_dump_commcomp='no'
	
	# Use ssl encryption with mysqldump?
	CONFIG_mysql_dump_usessl='no'
	
	# For connections to localhost. Sometimes the Unix socket file must be specified.
	#CONFIG_mysql_dump_socket=''
	
	# The maximum size of the buffer for client/server communication. e.g. 16MB (maximum is 1GB)
	#CONFIG_mysql_dump_max_allowed_packet=''
	
	# This option sends a START TRANSACTION SQL statement to the server before dumping data. It is useful only with
	# transactional tables such as InnoDB, because then it dumps the consistent state of the database at the time
	# when BEGIN was issued without blocking any applications.
	#
	# When using this option, you should keep in mind that only InnoDB tables are dumped in a consistent state. For
	# example, any MyISAM or MEMORY tables dumped while using this option may still change state.
	#
	# While a --single-transaction dump is in process, to ensure a valid dump file (correct table contents and
	# binary log coordinates), no other connection should use the following statements: ALTER TABLE, CREATE TABLE,
	# DROP TABLE, RENAME TABLE, TRUNCATE TABLE. A consistent read is not isolated from those statements, so use of
	# them on a table to be dumped can cause the SELECT that is performed by mysqldump to retrieve the table
	# contents to obtain incorrect contents or fail.
	#CONFIG_mysql_dump_single_transaction='no'
	
	# http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html#option_mysqldump_master-data
	# --master-data[=value]
	# Use this option to dump a master replication server to produce a dump file that can be used to set up another
	# server as a slave of the master. It causes the dump output to include a CHANGE MASTER TO statement that indicates
	# the binary log coordinates (file name and position) of the dumped server. These are the master server coordinates
	# from which the slave should start replicating after you load the dump file into the slave.
	#
	# If the option value is 2, the CHANGE MASTER TO statement is written as an SQL comment, and thus is informative only;
	# it has no effect when the dump file is reloaded. If the option value is 1, the statement is not written as a comment
	# and takes effect when the dump file is reloaded. If no option value is specified, the default value is 1.
	#
	# This option requires the RELOAD privilege and the binary log must be enabled.
	#
	# The --master-data option automatically turns off --lock-tables. It also turns on --lock-all-tables, unless
	# --single-transaction also is specified, in which case, a global read lock is acquired only for a short time at the
	# beginning of the dump (see the description for --single-transaction). In all cases, any action on logs happens at
	# the exact moment of the dump.
	# ==================================================================================================================
	# possible values are 1 and 2, which correspond with the values from mysqldump
	# VARIABLE=    , i.e. no value, turns it off (default)
	#
	#CONFIG_mysql_dump_master_data=
	
	# Included stored routines (procedures and functions) for the dumped databases in the output. Use of this option
	# requires the SELECT privilege for the mysql.proc table. The output generated by using --routines contains
	# CREATE PROCEDURE and CREATE FUNCTION statements to re-create the routines. However, these statements do not
	# include attributes such as the routine creation and modification timestamps. This means that when the routines
	# are reloaded, they will be created with the timestamps equal to the reload time.
	#
	# If you require routines to be re-created with their original timestamp attributes, do not use --routines. Instead,
	# dump and reload the contents of the mysql.proc table directly, using a MySQL account that has appropriate privileges
	# for the mysql database.
	#
	# This option was added in MySQL 5.0.13. Before that, stored routines are not dumped. Routine DEFINER values are not
	# dumped until MySQL 5.0.20. This means that before 5.0.20, when routines are reloaded, they will be created with the
	# definer set to the reloading user. If you require routines to be re-created with their original definer, dump and
	# load the contents of the mysql.proc table directly as described earlier.
	#
	#CONFIG_mysql_dump_full_schema='yes'
	
	# Backup status of table(s) in textfile. This is very helpful when restoring backups, since it gives an idea, what changed
	# in the meantime.
	#CONFIG_mysql_dump_dbstatus='yes'
	
	# Backup dump settings
	
	# Include CREATE EVENT in backup?
	#CONFIG_mysql_dump_create_event='yes'
	
	# Include CREATE DATABASE in backup?
	#CONFIG_mysql_dump_create_database='no'
	
	# Include DROP DATABASE in backup?
	#CONFIG_mysql_dump_add_drop_database='no'
	
	# Separate backup directory and file for each DB? (yes or no)
	#CONFIG_mysql_dump_use_separate_dirs='yes'
	
	# Choose Compression type. (gzip, bzip2 or xz)
	CONFIG_mysql_dump_compression='gzip'
	
	# Use hex-blob for backup?
	#CONFIG_mysql_dump_hex_blob='no'
	
	# Store an additional copy of the latest backup to a standard
	# location so it can be downloaded by third party scripts.
	#CONFIG_mysql_dump_latest='no'
	
	# Remove all date and time information from the filenames in the latest folder.
	# Runs, if activated, once after the backups are completed. Practically it just finds all files in the latest folder
	# and removes the date and time information from the filenames (if present).
	#CONFIG_mysql_dump_latest_clean_filenames='no'
	
	# Create differential backups. Master backups are created weekly at #$CONFIG_do_weekly weekday. Between master backups,
	# diff is used to create differential backups relative to the latest master backup. In the Manifest file, you find the
	# following structure
	# $filename 	md5sum	$md5sum	diff_id	$diff_id	rel_id	$rel_id
	# where each field is separated by the tabular character '\t'. The entries with $ at the beginning mean the actual values,
	# while the others are just for readability. The diff_id is the id of the differential or master backup which is also in
	# the filename after the last _ and before the suffixes begin, i.e. .diff, .sql and extensions. It is used to relate
	# differential backups to master backups. The master backups have 0 as $rel_id and are thereby identifiable. Differential
	# backups have the id of the corresponding master backup as $rel_id.
	#
	# To ensure that master backups are kept long enough, the value of $CONFIG_rotation_daily is set to a minimum of 21 days.
	#
	#CONFIG_mysql_dump_differential='no'
	
	
	# Notification setup
	
	# What would you like to be mailed to you?
	# - log   : send only log file
	# - files : send log file and sql files as attachments (see docs)
	# - stdout : will simply output the log to the screen if run manually.
	# - quiet : Only send logs if an error occurs to the MAILADDR.
	CONFIG_mailcontent='stdout'
	
	# Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
	#CONFIG_mail_maxattsize=4000
	
	# Allow packing of files with tar and splitting it in pieces of CONFIG_mail_maxattsize.
	#CONFIG_mail_splitandtar='yes'
	
	# Use uuencode instead of mutt. WARNING: Not all email clients work well with uuencoded attachments.
	#CONFIG_mail_use_uuencoded_attachments='no'
	
	# Email Address to send mail to? (user@domain.com)
	CONFIG_mail_address='xxxx@qq.com'
	
	
	# Encryption
	
	# Do you wish to encrypt your backups using openssl?
	#CONFIG_encrypt='no'
	
	# Choose a password to encrypt the backups.
	#CONFIG_encrypt_password='password0123'
	
	# Other
	
	# Backup local files, i.e. maybe you would like to backup your my.cnf (mysql server configuration), etc.
	# These files will be tar'ed, depending on your compression option CONFIG_mysql_dump_compression compressed and
	# depending on the option CONFIG_encrypt encrypted.
	#
	# Note: This could also have been accomplished with CONFIG_prebackup or CONFIG_postbackup.
	#CONFIG_backup_local_files=()
	
	# Command to run before backups (uncomment to use)
	#CONFIG_prebackup='/etc/mysql-backup-pre'
	
	# Command run after backups (uncomment to use)
	#CONFIG_postbackup='/etc/mysql-backup-post'
	
	# Uncomment to activate! This will give folders rwx------
	# and files rw------- permissions.
	#umask 0077
	
	# dry-run, i.e. show what you are gonna do without actually doing it
	# inactive: =0 or commented out
	# active: uncommented AND =1
	#CONFIG_dryrun=1

初步检查没有什么大问题,监测了一下定时任务
# crontab -l
数据库备份 - automysqlback- Error: Dependency programs are missing. mysql ……没有找到?,数据库,mysql,adb,java
定时任务没啥问题。决定通过执行备份命令方式进行排查问题
# /usr/local/bin/automysqlbackup /etc/automysqlbackup/automysqlbackup.conf
界面提示:automysqlback- Error: Dependency programs are missing. mysql ……
应该是automysqlbackup启动程序没有找到mysql.

数当时建数据库用的是docker 容器的方式进行安装的,本地没有初始化导致MySQL没有将路径放在/usr/local/bin:/usr/bin:/bin:/usr/local/mysql/bin

解决思路:

1.先查服务器的mysql 通过命令
#ps -ef | grep mysqldump
2.查看docker
#docker ps 
3.全局查到 通过find 命令查找mysqldump
# find / -name 'mysqldump'

数据库备份 - automysqlback- Error: Dependency programs are missing. mysql ……没有找到?,数据库,mysql,adb,java
4.编辑/etc/automysqlbackup/automysqlbackup.conf 通过修改里面的path
数据库备份 - automysqlback- Error: Dependency programs are missing. mysql ……没有找到?,数据库,mysql,adb,java文章来源地址https://www.toymoban.com/news/detail-804559.html

注:if mysql and mysqldump are not located in /usr/local/bin:/usr/bin:/bin:/usr/local/mysql/bin 这边其实有告诉我们如果msyql安装时没有将文件初始化到/usr/local/时可自行调整到指定目录。

到了这里,关于数据库备份 - automysqlback- Error: Dependency programs are missing. mysql ……没有找到?的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 数据库备份.....

      2.1.备份数据库school到/backup目录 2.1.1.mysqldump+binlog 2.2.备份数据库为带删除表的格式,可以覆盖已有数据库,而不需要手动删除原有数据库 2.3.直接将数据库压缩备份 

    2024年03月09日
    浏览(50)
  • 数据库运维——备份恢复

    数据库备份,数据库为school,素材如下 1.创建student和score表 CREATE  TABLE  student ( id  INT(10)  NOT NULL  UNIQUE  PRIMARY KEY  , name  VARCHAR(20)  NOT NULL , sex  VARCHAR(4)  , birth  YEAR, department  VARCHAR(20) , address  VARCHAR(50)  ); 创建score表。SQL代码如下: CREATE  TABLE  score ( id  INT(10)  NOT NU

    2024年02月16日
    浏览(66)
  • 定时备份MySQL数据库

    MySQL 提供了 mysqldump 命令来实现导出数据库,命令用法如下: 在 Linux 服务器中结合 crontab 定时命令实现定时备份数据库,同时支持压缩、备份日志、定期清理等功能。 新建 mysql 的备份命令脚本 复制以下内容: 至此,执行该脚本,可以生成压缩的数据库.sql文件 给 shell 设置

    2024年02月07日
    浏览(65)
  • MySQL_数据库备份

            根据备份的方法(是否需要数据库离线)可以将备份分为: 热备(Hot Backup) 冷备(Cold Backup) 温备(Warm Backup) 热备:在数据库运行状态下进行备份,备份时不需要停止数据库的服务。但是,由于备份时需要访问数据库文件,因此备份过程中可能会影响数据库的

    2024年02月03日
    浏览(39)
  • mysql数据库定时备份

    1  环境检查 1. 执行本手册前,请正确安装Mysql数据库,并知晓数据库用户名和密码; 2. 执行本手册前,请先确定Mysql数据库数据要储存的天数;默认30 2  批处理文件配置 当前步骤主要实现以下目标配置: Ø 配置Mysql安装目录,定义Mysql目录下BIN目录路径,用于定时导出数

    2024年02月08日
    浏览(62)
  • MySQL数据库备份脚本

    PS:此脚本简单易懂,根据实际情况修改个别参数测试后即可使用,如有错误请指出! data:是个文件夹,用于存储备份下来的数据; db_and_tables:是个文件夹,用于存储脚本中需要的配置参数; old_db :存储不需要备份的数据库;脚本会通过此配置从而生成需要备份数据库的

    2024年02月03日
    浏览(45)
  • mysql数据库自动备份

    服务器中数据库的数据是最重要的东西,如果因为某些情况导致数据库数据错误,数据错乱或数据库崩溃,这时一定要及时的修复,但如果数据丢失或数据没法用了,这时就要回滚数据了,而这时就需要我们经常的备份数据库的数据 一般别人都会推荐使用Navicat来备份和连接数据库,但

    2024年02月02日
    浏览(61)
  • MySQL数据库备份实战

    一、为什么进行数据库备份? 保证业务连续性 :数据库中存储着企业的核心业务数据,如果数据丢失或损坏,将会对企业的业务运营产生重大影响。通过定期备份数据库,可以在系统故障或数据丢失时快速恢复数据,保证业务的连续性。 保护数据资产 :数据库中存储着企业

    2024年02月08日
    浏览(50)
  • C#备份数据库文件

    c#备份数据库文件完整代码 sqlServer  存储过程: App.config添加配置项 DAL文件: BLL: 窗体调用:

    2024年02月09日
    浏览(43)
  • shell脚本备份数据库

    打开mysql的bin目录,然后在地址栏cmd,进入cmd界面,输入mysqldump命令,-u输入用户名,-p输入密码 还有数据库名称,以及后面要保存到的位置 检查centos是否自带数据库: 卸载centos下已安装数据库: 进入指定目录: 下载mysql8 之后通过xz和tar命令解压压缩文件: 将/usr/local/src下的

    2024年02月16日
    浏览(53)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包