①statement Mode (SBR)
Each SQL statement that modifies the data is recorded in the Binlog. The advantage is that there is no need to record every SQL statement and data changes in each row, reduce the amount of binlog log, save Io, improve
1. Add a field
The code is as follows
Copy Code
Add a field, the default is emptyALTER TABLE user add COLUMN new1 VARCHAR DEFAULT NULL;Add a field, default cannot be emptyALTER TABLE user add COLUMN new2 VARCHAR is not
Mysqlnd is a good thing. Not only can improve the efficiency of communication with MySQL database, but also can easily set some timeouts. For example, the connection timed out and the query timed out.However, when using MYSQLND, there is a place to
How does MySQL dynamically add a pruning column field, as sql:
Dynamically add column fields:
ALERT TABLE table1 Add transactor varchar (a) not Null;
To delete a column field dynamically:
ALERT TABLE tablename drop column field_id;
To modify a
LNMP One-click installation of the install package MySQL default is to open the log file,
If the data operation is more frequent, it will produce a lot of logs.
A mysql-bin.0000* similar file is generated below the/usr/local/mysql/var/,
And
Read about the MySQL error injection of technical articles, are similar to the following statements are injected. Such a statement is called the formula "formula", a lot of small dishes are used directly, do not know why this is. But I have to have
Solutions under Windows: My.ini inside the mysqld partJoin lower_case_table_names=2 [Mysqld]lower_case_table_names=2Set-variable=lower_case_table_names=0Port= 3306 Note: 1 indicates that case-insensitive 2 indicates case sensitivity Then reboot the
mysqldump Command mode
Backup IP to 192.168.1.100 a library:
The code is as follows
Copy Code
D:/apm/apmserv5.2.6/mysql5.1/bin>Mysqldump-h 192.168.1.100-u root-p Ucenter >d:/sql/uc_20130306.sqlEnter Password: * * *
Take signed as an example, you can store -2147483648 to 2147483647 and take Unsigned as an example, you can save 0 to 4294967295, but in the operation of such fields, you must be careful to avoid the deletion of the overdo, but become full of blood
Related Parameters View commands
SELECT @ @join_buffer_size;
SELECT @ @sort_buffer_size;
==========================================================================================
Join_buffer_size
The buffer used when our join is All,index,rang
200M Free space Support asp/phpAddress: Www.ShengHua.BizDomain Name Online binding √Set Default Document √Set Space Status √FTP Online Web upload √FTP client software upload √
300M High speed PHP free space
Hostse free space to use layered panel
This article uses Debian Sarge Linux systems for each of our nodes. Other Linux distributions may be installed a little bitDifference. The version of MySQL we use 5.0.19. If you don't want to use MySQL 5, you can also use MySQL 4.1 to doI haven't
ugu.pl Poland 150M can be bound rice free php space
Support FTP upload and management files;
Free to provide two-level domain name, you can also bind their own domain name;
Support PHP4, PHP5, and provide 50M MySQL database, also provide support
MySQL master-slave replication in general, we will set the database that needs to be synchronized, using the parameter configuration option, BINLOG-DO-DB, you can specify the database to be synchronized on master, and replicate-do-db specify the
MySQL concurrency is strong, fast response, excellent performance of the database software; PHP is a powerful server-side scripting language. The author uses PHP4.0 MySQL3.23.38 to establish a variety of applications in Shanxi Aluminum plant website
MySQL Database link Query class
Class Mysqlquery{var $sql;//sql Statement Execution resultsvar $query;//sql statementvar $num//return number of recordsvar $r;//return arrayvar $id//Return database ID numberExecute mysql_query () statementfunction
Nonsense not to say, although you can install MySQL directly through the Yum, but in order to be able to have a clearer understanding of the installation process, we still use the source code to compile the installation.
The code is as
A lot of times, MySQL data will be very large, the data by default in the/var/lib/mysql, because the/var divided the space is not big enough, so we need to change the MySQL data storage path, put it into the large partition, in order to be able to
The first type of manual simple to join can be implemented automatically start MySQL, behind is nothing to do write a section of the Shell code.
MySQL set to Linux service
The code is as follows
Copy Code
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