One, string type
Char and varchar
1. You need to specify the length of the character,the length of the char is the length of the character, and the length of the varchar is the length of the byte2. the length specified in char is the
MySQL usually can only cache read requests, that is, select, but the generalized query statements are included in the deletion and change, because each delete must first find out, each time the increase also must first check (primary key there is no
MySQL supports table-level locking of tables in the MyISAM and memory storage engines, and row-set locking of tables in the InnoDB storage engine. It is automatically obtained by default.The lock TABLES can be used to lock the table obtained by the
SQL injection is a common problem: the use of the "or" operator in SQL statements or the "/*" and "#" annotations. The former uses logical operations, or uses the characteristics of MySQL statements.Second, the solution:(A) Preparestatement +
After logging in to the MySQL server, you can use the grant command to create a user and assign permissions.mysql>for-adatabase changedmysql> GRANT select,insert,update,delete , Create,drop -on MySQL -to [email protected]0 rows affected, 1
1. Numeric type
Integer type
Bytes
Minimum value
Maximum Value
tinyint
1
Signed-128Unsigned 0
Signed 127Unsigned 255
smallint
2
Signed-32768Unsigned 0
Signed 3
Problem phenomenon:This time in the process of testing using MySQL found when landing MySQL appeared:warning:using a password on the command lineinterface can is Insecure. Alarm information, because want to put MySQL into the Linux ha, the discovery
First, get the complete structure of the data table. red for table name Show CREATE TABLE member \g; Ii. copying data from a table Suppose you want to copy all the data in the table T1 to the table t2 insert into T2 select * from T1; If you
EF's codefrist operation MySQL is prepared in advance:1. Install two packages: Mysql.data and MySql.Data.Entity, add 2 packages to the Package Manager in vs. (Note required VS2015, and EF6 support);2. Install MySQL, and configure the roles and
Internal connectionSyntax rules: Select *| Field List from the left table inner join right table on the left table. field = Right table. field;External connection1. Left Outer connection:Syntax rules: The Select *| field list from the left table and
Just to review this chapter today, will be published, as a review for their own Link Database$link = Mysqli_connect (' LOCALHOST/IP address ', ' username ', ' password ', ' database name ');Set character setsMysqli_set_charset ($link, ' UTF8
First, download the necessary things1.nginx:http://nginx.org/en/download.html2.php:http://php.net/downloads.php3.mysql: (for the time being)Second, installation and configuration1. Configure PHP:Rename the php.ini-development to php.ini and modify
MySQL restricts the size of packets accepted by the server according to the configuration file.Sometimes large inserts and updates are limited by the Max_allowed_packet parameter, resulting in failure.View current configurationShow VARIABLES like
MySQL Basics1. See how many databases are included under the current instance:show databases;2. Create a new database:Create Database DATABASENAME;3. Enter the specified database:Use DATABASENAME;4. Query How many tables are in this database:Show
Monitor mysql options
After installing mysql, You need to monitor the mysql service.The check_mysql provided by nagios open-source is good for mysql Server Load balancer. However, the monitoring of database hosts is insufficient. Use a monitoring
When MySQL inserts data, the problem of Chinese Garbled text (conversion) and mysql Garbled textWhen a piece of data with Chinese characters is inserted into the MySQL database, such as insert into employee values (null, 'zhang san', 'female ', '2017
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