Use length and char_length two functions
Length: is a calculation of the lengths of a field a Chinese character is counted three characters, a number or letter is counted as a character
Char_length: Whether Chinese characters or numbers or letters
One, uptime can view the running time of the system
Show global status like ' uptime ';
Second, use the Linux command to view
Linux has a uptime to view the system's running time, but MySQL does not have this command
But you can do it with the
The use of functions: Group_concat (), the implementation of an ID corresponding to multiple names, the original is a multiline data, the name merged into one line.
Its full syntax:
Group_concat (expr)
This function returns a string result with a
Tried google to several methods, did not solve, and then suddenly remembered in the launch of Apache, IIS port occupancy (because my Apache also uses 80 ports), so open the command line
Netstat-aon|findstr "3306"
Results show
Silently in the
When you create a stored procedure
Error message:
Copy Code code as follows:
ERROR 1418 (HY000): This function has none of the deterministic, NO SQL, or reads SQL DATA in its declaration and binary Loggi NG is enabled (for your
How do I create a memory table?Creating a memory table is very simple, just specify engine= MEMORY:
Copy Code code as follows:
CREATE TABLE ' tablename ' (' columnName ' varchar (256) not NUL) engine=memory DEFAULT charset=latin1
The basic difference:The MyISAM type does not support advanced processing, such as transaction processing, but InnoDB type support. MyISAM type tables emphasize performance, which is performed more than InnoDB types faster, but does not provide
My MySQL is the default UTF8 encoding, the database is also set up UTF8 encoding, the use of the program can add Chinese data, in CMD Use SQL statement new data are reported similar to incorrect string value: ' \xb2\xe2\xca\xd4 ' for Column ' title '
Create users and assign permissions;
Copy Code code as follows:
Insert into Mysql.user (Host,user,password) VALUES ("localhost", "Phplamp", Password ("1234"))//create User
Grant all privileges in dbname.* to ' username ' @ '% ' identified
Basic form
Property name RegExp ' Match method '
pattern characters for regular expressions
^ The part that matches the beginning of the character
EG1: Querying records starting with L from the Info table name field
SELECT * from info where
Generally speaking, C + + operation MySQL, to MySQL insert 10,000 simple data, very slow, incredibly 5 minutes,and open the business words, less than a second to be done!
The specific implementation code is as follows:
#include #include
The two days in the website moved, this site to move the use of direct packaging MySQL database and Web files in the form of migration, upload good MySQL data directory inside the database to the VPS MySQL storage database directory inside,
First, what is the MySQL table and partition
What is a table, from the superficial point of view, is to divide a table into n multiple small tables
What is partitioning, partitioning is to divide the data of a table into n multiple chunks that can
Create a MySQL user [root@xuhost opt]# useradd-g mysql mysql3307-s/bin/nologin-d/usr/local/mysql3307Create a data directory [Root@xuhost opt]# mkdir/mysqldata/dirdata/mysql3307 [root@xuhost opt]# chown Mysql.mysql-r-/mysqldata/dirdata/ mysql3307
Compile and install the first MySQL 5.1.33
cd/opt
/usr/sbin/groupadd mysql
/usr/sbin/useradd-g mysql mysql-s/bin/nologin-d/usr/local/mysql
Tar- ZXVF mysql-5.1.33.tar.gz
cd
MySQL database storage engine for MyISAM, in the case of large traffic, the data table is likely to be locked, which will cause users to connect to the site timeout and return 502, this time requires the MySQL database MyISAM storage engine to
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