First, both functions are used to process databases.
First, mysqli connections are permanent connections, while MySQL does not. What does it mean? MySQL will re-open a new process whenever it is used for the second time, while mysqli only uses the
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. '
Show status
Log on to MySQL directly under the command line to run the show status command. The query statement is as follows:
The same statement also has show variables; and show status is used to view the MySQL running status, which is similar
MySQL storage engine MyISAM, InnoDB, and memoryMemory will be introduced later
InnoDB supports transactions, foreign keys, and row locks. MySQL does not.
InnoDB does not support Fulltext index types
InnoDB does not save the specific number of
MySQL updates some data in the field in the first case:
CopyCodeThe Code is as follows: Update tab set a = Concat (substring (A, 1, 3), 'bbb ');
Start from 1 character of a and add 'bbb 'to A. If the original value of A is '123aaa', it is updated
The remote server can be accessed remotely.
The problem I encountered was: There are three servers A, B, and C, and C is the server. B can use PHP to successfully connect to MySQL ON MACHINE C, while machine A cannot connect!It can be said that
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
1. php version Overview
Differences between different php versions. The difference between VC6 and VC9, Thread Safe and Non-Thread Safe is generally found after php versions. VC6 is legacy Visual Studio 6 compiler, just
It is compiled using this
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
Preparation
1. configure the firewall and enable port 80 and port 3306.Vi/etc/sysconfig/iptables-A input-m state -- state NEW-m tcp-p tcp -- dport 80-j ACCEPT # Allow port 80 to pass the Firewall-A input-m state -- state NEW-m tcp-p tcp -- dport 3306
PHP programmers should know that they can use the mysql_pconnect (permanent connection) function to connect to the MySQL database. Using a permanent connection to the database can improve efficiency. However, in actual applications, permanent
Copy codeThe Code is as follows: #/bin/sh
# Check whether mysql server provides services normallyMysqladmin-u sky-ppwd-h localhost ping
# Obtain the Current Status values of mysqlMysqladmin-u sky-ppwd-h localhost status
# Obtain the current
MySQL has multiple storage engines. MyISAM and InnoDB are two common storage engines. Here we will introduce some basic concepts about the two engines (not in depth ).MyISAM is the default storage engine of MySQL. Based on the traditional ISAM type,
How to restore a MYSQL backup
The sample code uses PHP, which you are familiar with. Of course, you have read and understood the ideas in the sample code. I believe that you can quickly write the sample code in a language you are familiar.
1.
Reference Table
Count () is used to count the number of records
Copy codeThe Code is as follows: mysql> select count (*) from score;
Mysql> select count (*) from score where stu_id = 901;
Sum () summation Function
Copy codeThe Code is as follows:
The database inserts, updates, and deletes records in the table.
InsertStatement to insert data
UpdateStatement to update data
DeleteStatement to delete data
Reference Table
Insert data without specifying the field name
Insert field name not
The system information function is used to query the system information of the mysql database.
VERSION () returns the database VERSION number.
Copy codeThe Code is as follows: mysql> select version ();
+ ------------------------- +
| VERSION () |
+ -
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