PHP backup and restore MySQL database

1. configuration file sql.config.phpPHP $cfg _dbhost // $cfg _dbuser// $cfg _dbpwd/ / $cfg _dbname // ?>2. Backup program db_backup.phpphp Date_default_timezone_set (' Asia/shanghai '); require_once((dirname(__file__).‘

How MySQL avoids using the swap partition of Linux to improve read and write performance

How MySQL avoids using the swap partition of Linux to improve read and write performanceLinux has a lot of good memory, IO scheduling mechanism, but it does not apply to all scenarios. One of the headaches for DBAs is that it doesn't have to be that

Linux regularly backs up MySQL database and deletes backup files up to seven days ago

#!/bin/bash# name:bakmysql.sh# a shellscript for Auto DB backup and Delete old backup# backup address Backupdir=/home/mysqlbac kup# backup file suffix time time=_ ' date +%y_%m_%d_%h_%m_%s ' #需要备份的数据库名称db_name =test#mysql user name

32-bit win7+vs2008 compile MySQL 5.6.22 source code and install

The following installation instructions are from http://www.2cto.com/database/201407/316681.html win7+vs2010 source compiled MySQL, At the end of this article, we will explain some problems in compiling with vs2008 and the source code

MySQL's weird sync problem-repeat a relay-log

The weird sync problem with MySQLRecently encountered a strange MySQL synchronization problem, after multi-analysis and location found incredibly due to backup caused, very wonderful, hereby record the whole problem analysis and positioning

MySQL Auto Backup shell

#!/bin/bash#数据库配置信息#db_user = root#db_password = Wdmima#db_host = localhost#备份目录Backup_dir =/root/database/#获取当前时间Timestr = ' Date +%y%m%d '#mysql command#MYSQL = "/usr/local/mysql/bin/mysql"#MYSQLDUMP =

Production environment MySQL Quick Backup tool xtrabackup use case

Mysql Backup There are many ways, the most commonly used should be mysqldump , the database is exported to a SQL file, restore the source Db.sql on the cheerful execution. Small partner Happy cloth on a shell script, with Cron, happy to look at the

MySQL Data Backup and restore

First, data backup  1. Backup with mysqldump commandThe mysqldump command backs up the data in the database into a text file. The structure of the table and the data in the table are stored in the generated text file.The mysqldump command works very

Mysql: Remove heavy data with forced index

Database version:[Email protected]mysqltest ~]# mysql-u root-p123456Welcome to the MySQL Monitor. Commands End With; or \g.Your MySQL Connection ID is 389805Server version:5.1.73-community MySQL Community Server (GPL)Copyright (c) and/or, Oracle,

Java string intercept-finally with MySQL string intercept comparison

The substring () method in Java has overloads of two methods, one with one parameter and one with two parameters.The first one is written as: substring (n);//start interception from the character of the index is n, the condition (n>=0,nThe second

Javaweb MySQL QuickStart (11)

MySQL Quick start 1. About MySQL Structured Query Language Structured Query Language SQL standard, managed and maintained by ANSI (American Standards Institute, Core member of ISO). Database vendors support This standard and are expanded.

Java and MySQL data type comparison table

Type name Display length Database type Java type VARCHAR L+n VARCHAR Java.lang.String CHAR N CHAR Java.lang.String Blob L+n Blob Java.lang.byte[]

Ubuntu Online install MySQL and some operations

Ubuntu install MySQL online and some operations1 , installation Mysql to use. 3 a command:Open Terminal, enter: Sudoapt-get install Mysql-serverRe-enter: Sudoapt-get install Mysql-clientRe-enter: sudo apt-get install Libmysqlclient-dev2 , specific

MySQL inserts data for a specified field in a data table

Username NOT NULL no default value/default insert does not insert username field no errorJuly 23, 2014 21:05 Encyclopedia 369 MySQL inserts data for a specified field in a data tableInserts data for the specified field in the data table, that

OS Mac apache+php+mysql Environment configuration

1. Enable the Apache service that comes with your systemOpen Terminal (terminal)#sudo Apachectl Start#sudo vi/etc/apache2/httpd.confModifyLoadModule Php5_module libexec/apache2/libphp5.soOpen PHP/***** If you visit 403****/allowoverride NoneOrder

How Mysql sets the field to get the current time automatically

Application Scenarios: 1, in the data table, to record when each piece of data was created, do not need the application to deliberately record, and the data database to obtain the current time automatically record creation time;2, in the

MYSQL SELECT into record empty issue

SELECT Id into @Id from giftcode WHERE Status = 1 and Giftid = #GiftId # ORDER by Id ASC LIMIT 1;UPDATE giftcode SET usedtime = Now (), Status = 2,accountid = #AccountId # WHERE Id = @Id;SELECT * from Giftcode WHERE Id = @Id;Title, this 3 sentence

Six major differences between Mysql storage engine InnoDB and Myisam

Six major differences between Mysql storage engine InnoDB and Myisam This article mainly introduces the six major differences between Mysql storage engine InnoDB and Myisam. This article explains the differences in composition, transaction

Solve the Problem of garbled characters in mysql table Character Set gbk, column Character Set Latin1, and python query, mysqllatin1

Solve the Problem of garbled characters in mysql table Character Set gbk, column Character Set Latin1, and python query, mysqllatin1 Recently, I encountered an abnormal problem in the company. In mysql databases, the character sets of databases and

MySQL configuration optimization (1) -- slow log query

MySQL configuration optimization (1) -- slow log query(1) ERRLOG contains the related information when mysqd is started and stopped, and when the server encounters any serious error during running; you can use the -- log-error [= file_name] Option

Total Pages: 3233 1 .... 1195 1196 1197 1198 1199 .... 3233 Go to: GO

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.