The difference in performance of two SQL is different and functionally identical.Example OneRequirements: Take out a group (assuming ID 100) under the user number (ID), user nickname (nick_name), user gender(sexuality), User signature (sign), and
Basic operations of the database1. Create a database# CREATE DATABASE xxx;2. View the database# show databases;3. Deleting a database# drop database xxx;4. Using/Switching databases# Use XXX;Basic operation of the table1. View all tables in the
Content reference articles on the Web, only records here.I. Can ' t connect to MYSQL server on ' 192.168.x.x 'This is because the MySQL port is blocked by a firewall and requires Linux to execute the following commands:1.#/sbin/iptables-i input-p
SHOW VARIABLES like ' Slow_query_log ' #查看慢查询设置 1Set GLOBAL Slow_query_log_file = "D:/sql/sql_log/mysql_slow.log" #设置慢查询日志目录地址 2Set GLOBAL log_queries_not_using_indexes= on #没有使用索引的进入到文件里面 3Set GLOBAL Long_query_time = 1 #超过1 S's entry 4Extended
1 bytes = 8 bits tinyint is a byte 2 of 8 times = 256 so store up to 256Date and time data types
MySQL data type
Meaning
Date
3 bytes, date, format: 2014-09-18
Time
3 bytes, time, format: 0
Default password: rootMySQL displays all the databases with the following code:mysql> show databases;Mysql> Show tables;MySQL display commandSecond, show the command1. Display the list of databases.show databases;2. Display the data table in the
Problem:The database is in Chinese, and the search database on the Web page is displayed as follows:img/??. PngThe data inside the database is:img/My. pngSolve:First of all your PHP page if UTF-8After connecting to the database, insert the following
The previous PHP configuration is quite smooth, this time has been encountered MySQL module always does not take effect.Press the various methods online, as follows:1, open php.ini configuration file, generally in the C:\Windows below, search
1. Extract to any root directory of the diskIf you log in directly, you will be reported"MySQL is not an internal command" this is due to the absence of a configuration environment2.---Advanced---environment variables for computer---propertiesAdd
#sql Info Table Inserts a piece of data, the number field is inserted according to the maximum number+1 of the info table, and if it is initially inserted, number is 100000#在获取本表number最大值时, MySQL does not allow direct query of this table to obtain
Reference Documentation:http://www.linuxidc.com/Linux/2012-09/70459.htm1. Log slow Query SQL#配置开启 (Linux) modify My.cnf:log-slow-queries=/var/log/mysql/slowquery.log (Specify the log file location, can be empty, the system will give a default file
1. Download the MySQL repo source$ wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm2. Install the MYSQL-COMMUNITY-RELEASE-EL7-5.NOARCH.RPM package$ sudo rpm-ivh mysql-community-release-el7-5.noarch.rpm after installing this
The first two days of operation and maintenance feedback said that some of the machine's Max_allowed_packet two days will be changed to 1024, causing the client to call the error, the network has said that the memory is not enough, there are
From a full backup, restore a library (if the library you want to restore is called Hellodb) content:# mysqldump-uroot-proot--all-databases--master-data=2 > all.sql# mysql-uroot-proot-e ' Create database hellodb; ' Before restoring, first make sure
A query for numeric data:SELECT * from Tb_name WHERE sum > 100;Query predicate:>,=,,!=,!>,!,=Two query stringsSELECT * from tb_stu WHERE sname = ' Xiao Liu 'SELECT * from Tb_stu WHERE sname like ' Liu 'SELECT * from Tb_stu WHERE sname like '%
Xtrabackup is an open source project for Percona, which enables the ability to back up and recover very quickly with a innodb-like official hot backup tool InnoDB MySQL database. The Xtrabackup contains two tools:Xtrabackup is a tool for hot backup
MySQL stored procedure optimization instance and mysql Stored Procedure instance
Preface
During database development, complex business logic and database operations are often encountered. At this time, database operations are encapsulated using
Describes how to recover data after MySQL misoperations and mysql Data Recovery
1. Enable binlog.
First, check whether binlog is enabled.
mysql> show variables like "log_bin";+---------------+-------+|Variable_name | Value +---------------+-------+|
Mysql describe, describe
Today, when I wrote a program, I defined a table. One of the columns is the description, which is defined as describe. Then I executed the insert statement and reported various errors. Later I found out that the describe
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