Inter-Domain type:Try to use the timestamp type, because its storage space only needs half of the datetime type. For data types that only need to be accurate to a specific day, we recommend that you use the date type because its storage space only
CopyCodeThe Code is as follows: select a. 'table _ scheme' as db_name, A. 'table _ name', A. 'table _ rows ', A. 'Engine' --, .*
From
Information_schema. 'tables 'a
Left join information_schema. 'table _ constraints 'B
On a. 'table _ name' = B. '
Why should we use full-text indexes?
AverageDataLibrarySearchAll are usedSQLLike statement, like statement can not use the index, each query is from the first traversal to the last, the query efficiency is extremely low. Generally, if the data
Create a database
The simplest way
Create Database my_db;
Or
Create Database if not exists my_db;
Create a utf8-encoded Database
Create Database if not exists my_db default Character Set utf8 collate utf8_general_ci;
The default
After installation. Go to the command line
Mysql-uroot
The default password is empty, so you do not need to write it.
Logon with a password:
Mysql-uroot-pxxxxx
Change Password:
Mysqladmin-uroot password XXXXX
Modify the
I insist on learning a little bit every day and accumulating a little bit every day.ArticleI wrote it during my dinner. I learned how to operate MySQL using python in my spare time, So I sorted it out.
I am using a MySQL database operated by
Regular Expressions (RegEx) are a powerful tool for defining complex queries.Here is a simple document, which ignores some detailed information.A regular expression defines a string rule. The simplest regular expression does not contain any reserved
$ SERVER_NAME = "localhost: 3306"; // database server name
$ Username = "root"; // username used to connect to the database
$ Password = "rootpass"; // password used to connect to the database
$ Mysql_database = "dbname"; // Database
Http://www.cnblogs.com/jiangyao/archive/2010/10/19/1855256.html
Http://kb.cnblogs.com/a/1893220/
Name = 'date + % Y % m % d' # There is a space after dateMysqldump-u backup-H localhost-ppassword WordPress>/usr/local/virus/mysqlback/$ name#-P and
Introduction: This is a detailed page for Windows hosts to support PHP and MySQL in IIS. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: //
Stopped for half a day, watched for half a day , and then ......(Strong thoughts .....)
I found that applications such as ranking update are still comfortable with the stored procedure. A table named uch_zcount contains three fields: zcid, total,
Copy the mytbl table in the production database to mytbl_new quickly. The two commands are as follows:
12
Create TableMytbl_newLikeProduction.Mytbl;InsertMytbl_newSelect * FromProduction.Mytbl;
The first command is
Using System; using System. Data;
Using System. Data. SqlClient;
Using System. Configuration;
Using System. Web;
Using System. Web. Security;
Using System. Web. UI;
Using System. Web. UI. WebControls;
Using System. Web. UI. WebControls.
Copy codeThe Code is as follows: Select CONCAT ('drop table', table_name ,';')
FROM information_schema.tables
Where table_name LIKE 'dede _ % ';
"Dede" is the prefix of the table to be deleted. After this SQL statement is executed, a series of
First, let's take a look at the formula. MySQL memory is divided into two parts: global memory and thread memory (not all, but the most influential part ):
Copy codeThe Code is as follows: per_thread_buffers = (read_buffer_size +
1. Create a table:
Copy codeThe Code is as follows: drop table if exists photo;
Create table photo (
Id int not null AUTO_INCREMENT primary key,
Name VARCHAR (100) COMMENT 'name ',
Photo blob COMMENT 'photo'
)
ENGINE = InnoDB
Default charset =
In English, order by is the sort of rows. The default value is ascending. Order by must be followed by multiple field names.Group by is a group in English. You must have an aggregate function. At least one group flag field is required for use.
What
Copy codeThe Code is as follows :#! /Usr/local/python
Import OS
Import time
Import string
Source = ['/var/www/html/xxx1/', '/var/www/html/xxx2/']Target_dir = '/backup /'Target = target_dir + time. strftime ('% Y % m % D ')Zip_comm = 'zip-r % s
After a large amount of data is deleted from your database, you may find that the size of the data file is not reduced. This is because fragments are left in the data file after the delete operation. Discuz! The data table optimization function is
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