1. Use of arrays in PHP
Using associative arrays (associatively-indexed arrays) is very helpful when manipulating a database, so let's look at an array traversal of the basic number format:
$temp [0] = "Richmond";
$temp [1] = "tigers";
$temp [2] = "
Using PHP to implement XML backup MySQL database collection
Here is the file code for backing up the MySQL database via apache+php under Linux:
file One, listtable.php (file lists all tables in the database for backup selection)Please select the
First attach coreseek4.1 version download
Pre-preparation work:
Yum install make gcc g++ automake libtool mysql-client libmysqlclient15-dev libxml2-dev libexpat1-dev autoconf automake li Btool
Let's say we download the package
System configuration: Win2000 English version +jdk1.4.1+tomcat4.0.5+apache2.043
Development cycle: Make every effort, and lasted nearly 15 days.
Implementation features:
1. Gallery:
Pictures and related text submission, pagination display, delete.
2.
Mysql python version of the explosion small script, you need to install the Python plug-in Mysql-python.exe, you can see the small amount of code, (note: The username and password are similar dictionaries.) Usage: Save code for mysqldatabaseblasting.
Mysql PHP Version blasting small script
(Note: From the code you can see that the user name is a variable, the general database account does not change, so the user name does not use the array as a dictionary.) A password is a dictionary using an
Copy Code code as follows:
Import java.sql.*;
public class MySQL {
public static String URL = "Jdbc:mysql://localhost:3306/test";//characterencoding=gbk
public static String username = "root";
public static String password = "root";
MySQL is a more commonly used database, daily development is also used more. 工欲善其事 its prerequisite, this article specifically explains how to install MySQL under CentOS (similar to other Linux distributions). First prepared materials: Mysql, I use
Two programs on the network to achieve the exchange of data through a two-way communication connection, the end of this connection is called a socket, generally in the configuration of the MySQL environment in the MySQL my.cnf file in the [mysqld]
In MySQL, indexes can be divided into two types of hash index and Btree index.
Under what circumstances can I use a B-tree index?
1. Full Value Matching index
Like what:
Orderid= "123"
2. Matching the leftmost prefix index query
For example,
This example describes the MySQL federated index. Share to everyone for your reference, specific as follows:
Employee Table UserIDDepartment Table DeptIDEmployee Department Table
Condition: An employee can correspond to multiple departments
Under the following conditions, MySQL will do a full table scan:
The 1> datasheet is too small to do a full table scan faster than doing a lookup on the index key. This is usually done when the total number of records in the table is less than 10
MySQL Chinese Sort Method 1
MySQL in the query string is not sensitive to the case, when compiling the MySQL in general with the ISO-8859 character set as the default character set, so in the comparison process of Chinese character encoding
1. Export the entire database
Mysqldump-u user name-p database name > exported file name
Mysqldump-u wcnc-p SMGP_APPS_WCNC > Wcnc.sql
2. Export a table
Mysqldump-u user name-P database name Table name > exported file name
Mysqldump-u wcnc-p
First create a table
Use Test;
Create Table Tabletest (
' ID ' Mediumint (8) Default ' 0 ',
' Name ' varchar default '
) Type=myisam;
Import data to a datasheet
Load Data InFile ' c:/data.txt ' into Table ' tabletest '
Commonly used as
1. Enter the Mysqladmin processlist into the Mysql/bin catalogue;2. Start MySQL, enter show processlist (Close a thread kill ID;);If you have SUPER permissions, you can see all of the threads, otherwise you can only see the thread that you
Take Mysql-noinstall-5.0.22-win32 as an example, after decompression will see the Mysql-5.0.22-win32 folder below, there are five INI format files, the My-medium.ini file copies a copy, renamed My.ini, open My.ini file, in Under [client], [mysqld]
Release in 1.apache2.2\conf\httpd.conf:
Include conf/extra/httpd-vhosts.conf (remove front #)
Increase in 2.httpd.conf
#项目文件夹DWM目录, be careful not to use Chinese to define directories and folders
#
# Possible values for the Options directive are '
or part of the cronjob, which is running in the background interactively in the rails timing task
Checkipaddress () {echo $ |grep "^[0-9]\{1,3\}\.[ 0-9]\{1,3\}\. [0-9]\{1,3\}\. [0-9]\{1,3\}$ ' >/dev/null if [$ = 1]; Then return 1 Else a= '
Daily backup MySQL database tasks, delete the specified number of days before the data, keep the date of the specified day;
Demand:1, backup MySQL data 4 points per day;2, to save space, delete more than 3 months of all backup data;3, delete more
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