Linux Backup Data command

Source: Internet
Author: User
One, backup data command:
Mysqldump-u root-p zzqndyy_emr |gzip-9 >/root/6yc_zzqndyy_emr-20180115.gz

Error:
1. Error 1045
1045 Access denied for user ' root ' @ ' localhost ' (using Password:yes)
How to resolve:
In/etc/my. CNF file
[Mysqld], add skip_grant_tables after restart

2. Error 2002
Mysqldump:got Error:2002:can ' t connect to local MySQL server through sockets '/tmp/mysql.sock ' (2) when trying to Connec T
How to resolve:
Enter the following command:
Ln-fs/usr/local/mysql/bin/mysqldump/usr/bin
Ln-s/var/lib/mysql/mysql.sock/tmp/mysql.sock

Second, remote transfer backup files:
Scp/root/10wz_dbemr_txxrmyy-20180115.gz 10.253.1.16:/data/qianzhiji/20180115/10wz_dbemr_txxrmyy-20180115.gz

Linux Backup Data command

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.