This article mainly introduces the usage of MySQL mysqldump and the usage of related Source commands. for details about how to export MySQL mysqldump, refer to the following:
The code is as follows:
Shell> mysqldump [OPTIONS] database [tables]
If
This article describes how to view and import and export MySQL logs in Windows, if you need it, you can refer to MYSQL with different types of log files (each storing different types of logs), from which you can find out what MYSQL has done, these
In linux, the mysql automatic backup script code bitsCN.com is stored in/home/user/mysql_backup.sh.
Crontab
# Crontab-l
# M h dom mon dow command
28 16 ***/home/user/mysql_backup.sh
The script is as follows:
#! /Bin/sh
# Mysql_backup.sh: backup
Share Mysql commands,
1. Connect to Mysql
Format: mysql-h host address-u user name-p User Password
1. Connect to MYSQL on the local machine.
First, open the DOS window, enter the mysql \ bin directory, type the mysql-u root-p command, and press
Scripts are placed in the/home/user/mysql tutorial _backup.sh
Crontab
# crontab-l
# m H Dom Mon Dow command
* * */home/user/mysql_backup.sh
The script is as follows
#!/bin/sh
# mysql_backup.sh:backup MySQL databases and keep newest 5 days
MySQL database introduction, installation and configuration file MySQL database introduction mysql是开源关系型数据库,遵循GPL协议。 mysql的特点是性能卓越且服务稳定,开源,无版本限制,成本低,单进程多线程,多用户,基于C/S(客户端/服务端)架构,安全可靠,插入式存储引擎。
Starting the MySQL service often prompts the following error:ERROR 2002 (HY000): Can ' t connect to local MySQL server through socket '/var/lib/mysql/mysql.sock 'This is due to the mysql.sock location of the socket file that modifies the MySQL
As shown below, PHP connection MySQL error:
SQLSTATE[HY000] [2002] Can ' t connect to local MySQL server through socket ' MySQL ' (2)
The test code is as follows:getmessage ();}" Solutions "Change host=localhost to host=127.0.0.1 !
# feedback/comment/suggestions:http://www.real-blog.com/# ----------------------------------------------------------------------# your MySQL login information# Db_user is MySQL username# db_passwd is MySQL password# db_host is MySQL host# -----------
The MySQL database import and export can be mysqldump with the database backup toolThe Mysqldump tool is a very handy gadget for MySQL, with the MySQL installation directory/usr/local/mysql/bin (CentOS) being under.Like MySQL, Mysqldump is an
The script is placed in the/home/user/mysql_backup.sh
Crontab
# crontab-l
# m H Dom Mon Dow command
* * */home/user/mysql_backup.sh
The script is as follows
Copy Code code as follows:
#!/bin/sh
# mysql_backup.sh:backup MySQL databases
Here's a demonstration of the process of building a multi-master from MySQL 5.7:Lab Environment:master_1:192.168.10.128master_2:192.168.10.129slave_3:192.168.10.130First, the database that needs to be synchronized is exported on master_1 and master_2
#!/bin/bash# Db_user is MySQL username# db_passwd is MySQL password# db_host is MySQL host# -----------------------------Db_user= "Ari"db_passwd= "[Email protected]"db_host= "localhost"# The directory for story your backup file.backup_dir=
You can use the MySQL command line to back up and restore the database. The following describes how to use the MySQL command line to implement this function for your reference.
You can use the MySQL command line to back up and restore the database.
MySQL mysqldump is used for export. The basic usage is as follows:Shell> mysqldump [OPTIONS] database [tables]If you do not specify any tables, the entire database will be exported.Run mysqldump -- help to obtain the option table supported by your
MySQL command line Export Database: 1, enter the bin folder under the MySQL Directory: the directory from cdMySQL to the bin folder, as shown in the command line I entered: cdC: programFilesMySQLMySQLServer4.1bin (or directly add the directory to
Welcome to the Linux community forum and interact with the 2 million technical staff to edit the script file [python] viewplaincopyprint? Db_userrootdb_passwd123456db_hostlocalhostbackup_dirusrlocalapache2htdocsbackuptime $ (date + % Y % m % d % H %
Using MYSQL for database backup is also a regular database backup method. It has the same concept as other database servers, but have you ever thought about it, mySQL will have a simpler backup method using the file directory, and it will be faster
What should I do if I want to export some data in a table? MysqldumpMySQLmysqldump-uroot-p -- no-create-dbTRUE -- add-drop-tableFALSE -- whereuser128560 database name -- skip-lock-tablesdata. SQL # where -- where specifies the query condition
Use the mysqldump command to back up the MySQL database script (without a comment version, suitable for production environments)
Use the mysqldump command to back up the MySQL database script (without a comment version, suitable for production
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.