One, data type
1. Integral type
Data type storage space description range of values
TINYINT1 byte very small integer with symbolic value: -128~127
Unsigned value: 0~255
SMALLINT2 byte small integer with symbolic value: -32768~32767
Unsigned
An If expression
IF (EXPR1,EXPR2,EXPR3)
If Expr1 is true (expr1 <> 0 and Expr1 <> NULL), then the return value of if () is expr2; Otherwise, the return value is EXPR3. The return value of IF () is a numeric value or a string value, depending on
1, automatic installation and deployment of MySQL, if the MySQL has been installed to determine whether the version is lower than the main library (there is a backward-compatible problem)2, get the main library backup files and binlog information
SQL statement Optimization techniques
Database backups can prevent server downtime, disk corruption, RAID card corruption, and other unexpected data loss.
MySQL Backup tool:MysqldumpIbbackupReplicationLVM Snapshotsor third party tools Xtrabacup,
The advantages of MySQL replication mainly include the following 3 aspects:1. If there is a problem with the primary server, you can quickly switch to services provided from the server2. Can perform query operations from the server, reduce the
Method 1
Using phpMyAdmin, this is the easiest, to modify the MySQL library's user table,
But don't forget to use the password function.
Method 2
Using Mysqladmin, this is a special case of the previous declaration.
Mysqladmin-u
Connecting to a database$link _id = mysql_connect ("localhost", "root", "") or Die ("Connection failed");if ($link _id){mysql_select_db ("My_test");if (!$_get[id]){
$result =mysql_query ("SELECT * from UserInfo");echo " number User name Sex Age
The processing method has two
1, (How to resolve the client and server-side connection (MySQL): xxx.xxx.xxx.xxx is isn't allowed to connect to this MySQL serv) Authorization Act. For example, you want to myuser use MyPassword to connect to a MySQL
a.mysql the default encoding for installation is latin1, so be aware that you need to change it manually to UTF8.
b. Modify My.ini file
my.ini [MySQL] corresponds to client parameters
[Mysqld] corresponds to the database background
Demo data
Table structure:
The code is as follows
Copy Code
Mysql> DESC Demo; +-------+------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+--------------
Mysql> select * from Tt_address;+-----+-----+--------+--------+------+--------+------------+-------------+-----------+----------+-------+------------------------+-------+--------+-----+---------+----------+------+---------+------+-----+--------+-----
Today in the use of hibernate to MySQL insert data in the garbled problem, the specific performance when I utf-8 in the insertion of the Chinese when the OK, and then use the MySQL Workbench set to Uft-8 to show the data from the MySQL query is also
Today, a few MySQL servers suddenly power outages, restart after the replication can not start, always reported the following error:
080922 10:29:01 [note] Slave SQL thread initialized, starting replication into log ' mysql-bin.000778 ' at position
Problem phenomenon:
A similar error occurs when inserting Chinese into MySQL tutorial 5.5
ERROR 1366 (HY000): Incorrect string value: ' Xd6xd0xcexc4 ' for columnProblem Reason:
Db CharacterSet's character set is set to Latin1
1, first determine
MySQL Tutorial too many connections
Solution:
1. Join try/catch/finally where you use MySQL data source
2. Check whether the mysqlconnection after use to do close ()
3. Do not make the mysqlconnection connection static, each connection creates a
This tutorial to talk about the MySQL Tutorial view query and delete Oh, query view with the show view name, delete the MySQL view with drop is also very simple, but delete the view to have drop permission to do. Now let's look at the view
View the
The condition definition and processing of stored procedures can define the problems encountered during the process of processing.
The definition of a condition
DECLARE condition_name Condition for Condition_vale
Condition_value:
Sqlstate[value]
MySQL is a fully networked cross-platform relational database system, a real multi-user, multi-thread SQL database server, and a distributed database management system with a client/server architecture. it has the advantages of powerful functions,
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