mysqldump: command not found

原因:这是由于系统默认会查找/usr/bin下的命令,如果这个命令不在这个目录下,当然会找不到命令,我们需要做的就是映射一个链接到/usr/bin目录下,相当于建立一个链接文件。
首先得知道mysql命令或mysqladmin命令的完整路径,比如mysql的路径是:/usr/local/mysql/bin/mysql,我们则可以这样执行命令:

# ln -s /usr/local/mysql/bin/mysql /usr/bin

# ln -s /usr/local/mysql/bin/mysqldump /usr/bin

# ln -s /usr/local/mysql/bin/mysqladmin /usr/bin

时间: 2024-07-29 12:40:50

mysqldump: command not found的相关文章

mysqldump: command not found问题解决

首先得知道mysql命令或mysqldump命令的完整路径,可以使用find命令查找除非你知道mysql安装路径可以略过这一步. find / -name mysql -print 例如我的mysql的路径是:/usr/local/mysql/bin/mysql,然后映射一个链接到/usr/bin目录下,相当于建立一个链接文件 ln -fs /usr/local/mysql/bin/mysqldump /usr/bin mysqldump同理 其中/usr/local/mysql/是mysql的

关于mysql源码安装后备份没有mysqldump命令的错误解决

源码安装的mysql在经历了创建库,选定库,创建表,插入数据后,备份时出现了 -bash:mysqldump  command not found 的错误,这是环境变量配置的问题, 命令解决入下: vim  /etc/profile 在最后一行添加:export  PATH=/usr/local/mysql/bin :$PATH 执行命令:source /etc/profile 问题解决.

MySQL backup - How to backup a MySQL database

MySQL backup FAQ: How do I backup a MySQL database? I can't speak about backing up MySQL databases that are modified twenty-four hours a day seven days a week, but on all the MySQL databases I currently work with, there are always times when I can gu

MYSQL术语表

MYSQL术语表 http://dev.mysql.com/doc/refman/5.6/en/glossary.html MySQL Glossary These terms are commonly used in information about the MySQL database server. This glossary originated as a reference for terminology about the InnoDB storage engine, and th

How to Baskup and Restore a MySQL database

If you're storing anything in MySQL databases that you do not want to lose, it is very important to make regular backups of your data to protect it from loss. This tutorial will show you two easy ways to backup and restore the data in your MySQL data

阿里云服务器搭建经历

前言 转眼间又到了周五,今天暂时想不到什么可以写的,但是又不能浪费了周五这么难得的机会,不写点东西感觉有点罪过啊~~突然想起来以前给某个小公司做了一个留言管理系统,并且部署在阿里云服务器上.所以当时也是倒腾了一下阿里云服务器的搭建,其中也有一些踩坑的经历,想在这里记录一下,顺便也可以温习一下这个过程,同时也希望能够帮助到其他人,避免重复踩坑.好了,废话不多说,直接开始吧. 原材料: 主要需要安装配置mysql.jdk.tomcat.阿里云服务器我选择的是比较主流的Centos7操作系统,其他感觉

斑马斑马-04-白云之上-mysql定时自动备份实现

原文链接:https://blog.csdn.net/qq_31659985/java/article/details/84668379 mysql_backup.sh 用于备份数据 mysql_restore.sh 用于恢复数据 remove_backup.sh 用于删除一段时间以前的备份文件 一.数据备份 1.创建备份目录 我们把备份文件放在/data/backup/mysql下面,把脚本放在/data/backup 下面 创建文件夹:mkdir -p  /data/backup/mysql

mysqldump提示Warning: Using a password on the command line interface can be insecure.

场景: 主机A和主机B在局域网内,之前一直在主机A上用计划任务在跑mysqldump去备份主机B上的数据库,前两天突然出现:Warning: Using a password on the command line interface can be insecure. 之前的计划任务的代码是: mysqldump -h10.255.xxx.xxx  -uroot -pxxxx dbxxx | gzip > /root/Db/Backup/DbName_$(date +\%Y\%m\%d-\%H)

MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: [Warning] Using a password on the command line interface can be insecure.

在阿里云服务器增加一个shell脚本定时备份数据库脚本执行任务时,测试性的执行了备份命令,如下 [[email protected] mysql_bak]# /usr/local/mysql/bin/mysqldump -uroot -pmyServerPwd# dateabase > /data/mysql_bak/bak_test.sql 在执行完了命令本该在指定的目录下出现bak_test.sql文件,然而并没有生成,报了一行错误.这个问题应该是在MySQL5.6+版本的时候就有出现,可能