For people who often use MySQL, phpMyAdmin is a necessary tool. This tool is very powerful and can perform almost all database operations, but it also has a weakness that can be very slow to import large data files to a remote server, or even a long
The background of the problem: in the actual use of MySQL, if the traffic is relatively large, it is likely to have a large number of locked state of the process, but it is not convenient to identify which SQL caused the problem, many people
Shong asked me how to back up the database, here are 3 ways to back up the database:
(1) Backing Up database files
Each database and datasheet in MySQL corresponds to the directory in the file system and the files under it.In Linux, the database
1, one way is to set the table or row collation, so that it is binary or case sensitive. In MySQL, the naming method for column collate its conventions is as follows:*_bin: Binary case sensitive collation, which means case-sensitive.
*_cs:case
Version selection
Because the version of MySQL is more and more, and as a small and medium-sized site may not have enough economy to buy a commercial version, so generally choose a free version, and the function is enough to use.
The rich wayward
When the data volume of the database rises to a certain amount, the performance becomes the question which we cannot but pay attention, how optimizes? There are only a few ways to use them:
1, the table, that is, a large number of expression data
This article aims at the MySQL database basic operation carries on the study research, needs to understand the friend not to miss this article.
The following are used on the command line under Windows 64-bit operating systems.
Before we learn, let'
This article for you to share two kinds of MySQL to create a database method for your reference, the specific content as follows
The first method: using Mysqladmin to create a database with ordinary users, you may need specific permissions to
Today in writing MySQL encountered a more specific problem.
The MySQL statement is as follows:
Update Wms_cabinet_form Set Cabf_enabled=0
where cabf_id in (
SELECT wms_cabinet_form.cabf_id from Wms_cabinet_form
Inner Join wms_cabinet on wms_cabinet_
The formula for using EXECL to convert timestamps is:
Code:
=(xxxxxxxxxx+8*3600)/86400+70*365+19
use the MySQL statement to interpret timestamp syntax examples:
Code:
SELECT FROM_UNIXTIME(1234567890, '%Y-%m-%d %H:%i:%S')
Case one: Shell+cron realize MySQL automatic backup and automatically delete n days before backup
Copy Code code as follows:
#!/bin/sh
Dump=/usr/local/mysql/bin/mysqldump
out_dir=/home/ldl/xxx/backup/
Linux_user=ldl
ODBC refers to the Open data connection, which is the Microsoft-led data driver, it can be connected to other data, through the SQL language to operate the data, of course, PHP also provides a function of the ODBC data connection,
Using PHP to
In MySQL, there are two ways of paging query, one is using count (*), the specific code is as follows
Copy Code code as follows:
SELECT COUNT (*) from foo WHERE b = 1;
SELECT A from foo WHERE b = 1 LIMIT 100, 10;
Another is
All stems from an experiment, please see the following example:
Table:
Copy Code code as follows:
CREATE TABLE IF not EXISTS ' foo ' (
' A ' int (a) unsigned not NULL auto_increment,
' B ' int (a) unsigned not NULL,
' C '
Myiasm is a new version of the Iasm table, with the following extensions:
Portability of the binary hierarchy.
The null column index.
Fewer fragments are available for variable-length rows than for ISAM tables.
Support for large files.
Better index
php+mysql Example
Please enter data in the text area and determine
"method=post>
?
$connect _id=mysql_connect ("localhost", "username", "password");
if (Isset ($txt)) {
$dbtime =date ("y-m-d h:i:s");
Mysql_db_query ("Usernamedb", "INSERT
A simple tutorial on MySQL using the Linux system above (i)
Field parameters are "(Field name 1 data type 1, field name 2 data type 2, ...). ) "In the form of construction.
About MySQL commonly used data types, one is more commonly used several,
1: Error log mass error
150602 14:40:02 [Warning] Unsafe statement written to the binary log using statement format since Binlog_format = Statemen T. INSERT ... SELECT ... On DUPLICATE KEY UPDATE are unsafe because the order of which rows are
Myisam_revocer controls the way Myisam find and fix errors.
Automatic repair of MySQL MyISAM table
Common MySQL children's shoes know that this myisam type of table is very easy to damage, most people may be using the MYISAMCHK command to manually
According to the literal meaning is to write the parameters of the whole. This is not supported in a later version.
Many of the information on the Internet is directly using Myisam_recover can be used to achieve the MySQL database table repair, but
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