Precautions for using Linux mysql dump Databases

Source: Internet
Author: User

Dump can execute functions similar to tar. However, dump tends to consider file systems rather than individual files. This article provides answers to some questions about the Linux mysql dump command.


1. Ensure that the directory for storing Linux mysql dump exists and the process has the write permission on the directory. The directory that stores Linux mysql dump, that is, the current directory of the process, which is generally the directory where the command was issued to start the process. However, if the script is started, the script may modify the current directory, and the current directory of the process will be different from the directory where the script was originally executed. In this case, you can view the target of the "/proc/<process pid>/cwd" symbolic link to determine the real current directory address of the process. You can also view the processes started by the system service in this way.


2. If the program calls seteuid ()/setegid () to change the valid user or group of the process, the system will not generate coredump for these processes by default. Many service programs call seteuid (), such as mysql. No matter which user you use to run mysqld_safe to start mysql, the effective user of mysqld is always the msyql user. If you run A program with user A, but the user who sees the program in ps is B, then these processes call seteuid. To generate coredump for these processes, you need to change the content of the/proc/sys/fs/suid_dumpable file to 1. The default value is 0)


3. This is generally known as setting a large enough core file size limit. The core file size generated when the program crashes is the memory size occupied by the program running. However, when a program crashes, the behavior cannot be estimated as usual. For example, errors such as buffer overflow may cause the stack to be destroyed. Therefore, the value of a variable is often changed to a mess, then the program uses this size to apply for memory, which may cause the program to occupy more memory than usual. Therefore, no matter how little memory is occupied during normal running of the program, make sure to generate the core file or set the size limit to unlimited.

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.