Php+mysql is one of the most frequently used gold partners, both of which are used to perform the best performance and, of course, even more perfect if used with Apache.Therefore, you need to do a good job of MySQL query optimization. The following
SQL Classification DDLDDL:data definition LanguageIt is primarily used to define and maintain the various operands of the database, such as libraries, tables, indexes, viewsIt can also be said that the level of operation is in the database and the
Reference Official Document: https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/First create a repo filevim/etc/Yum. Repos.d/mysql-community.repoThen write according to the official documentation:For example, installing MySQL 5.7 in CentOS
Description
According to the needs of the business, from the perspective of reasonable use of hardware resources, production database to prepare some of the business running many instances, in the process of testing encountered a small problem,
First, the integral typeEach of the integers has both unsigned (unsigned) and signed (signed) types.
MySQL data type
Meaning
tinyint (m)
1-byte representation: Signed ( -128~127); unsigned (0~255)
Deploy MySQL on a Linux system, use the version Mysql-5.6.34-1.rhel5.x86_64.rpm-bundle.tar, unzip the Linux system, install the following two files in the unzip file:(The main installation of these two
MySQL is a relational database management system developed by the Swedish MySQL AB company and currently belongs to Oracle products. MySQL's most popular relational database management system, MySQL is one of the best RDBMS (relational database
Connect to a remote Linux databaseMysql-hip-u User name-p passwordmysql-h192.168.1.180-uroot-p123456What databases are listedshow databases;Create a databaseCreate DATABASE xxx;Switch databaseUse XXX database;List all tables in the databaseShow
NOTE: The SQL statement in the MySQL database is terminated by default with ";". Enter the command, the keyword can be uppercase or lowercase, but must be consistent, I prefer to use lowercase, personal habits bar.There are three main ways of
MySQL Lock wait analysis "1" in the lock waiting analysis is step by step, although the final analysis came out, but the time is relatively long; after clearing the relationships between the tables, get the following SQL statement for later
File:Apache:first modify the Apache configuration file, let Apache support parsing php files. Apache configuration files are httpd.conf in the Conf directory of the Apache installation directory. 1. Allow Apache to parse the PHP file and locate it
Data backup 1. Backup with mysqldump commandThe mysqldump command backs up the data in the database into a text file. The structure of the table and the data in the table are stored in the generated text file.The mysqldump command works very simply.
Scripting idea: Remotely backing up the main library data from the library, and then recovering the data from the library, starting from the library.Environment: CentOS6.5 has installed MySQL multi-instance with Port 3306, 3307.The two instance is
I like the history of its function, the execution of the operation of the corresponding statements are output, some troublesome statements with the GUI operation, but also to save the corresponding SQL statement.Not bad!Official website:
If you have not modified the configuration of MySQL, by default, the initial value of Wait_timeout is 28800.Wait_timeout has a lot of drawbacks, its embodiment is that a large number of sleep in MySQL can not be released in a timely manner, drag
I also Baidu a lot of methods are not used (I use the MySQL is free installation version, the kind of directly decompression)Basically all say no set data directory, no initialization, I am very depressed is to follow those steps to deal with, to
To prevent SQL injection, here are a few important points to note:
1. Never trust the user's input. The user's input can be verified by regular expressions, or by limiting the length, by converting the single quotation mark and the double "-".
How to Use tcpdump to capture mysql packets and use tcpdumpmysql
The command is as follows:
Tcpdump-s 0-l-w-dst 192.168.244.10 and port 3306-I eno16777736 | strings
-I indicates the network interface of the listener. in RHEL 7, the network
Mysql-based data management and mysql Data ManagementPreparation Note: mysqldump.exeis the data import tool of the mysqldata warehouse server ( mysql.exe)
1. Data Backup
Store data on the database server in a local SQL File
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