Command preparation
Create directory
Mkdir directory name
Chmod 777 permission for directory name change
Add startup Item Service
Chkconfig -- add php-fpm
Chkconfig nginx on
Searching for file locations is often used to find various configuration
How to query the differences between where and having:
Having clauses are similar but different from where clauses. They are all statements that set conditions.
In the Query Process, aggregate statements (sum, min, max, avg, count) are executed
During the past few days, data statistics are performed. During the statistical process of database data, You Need To group data by specified days,
If you haven't found a good method before, retrieve the data and group it in the program.
1. Create Table
Create table (
Name char (20) not null,
Id char (20) not null primary key );
2. Create Table B
Create table B (
B _name char (20) not null,
B _id char (20) not null,
Constraint foreign key (B _id) references a (id) on delete
Run the df command to check whether the disk is full. Because the system default partition is used at that time, I don't know why I cannot resize it automatically! We will handle this issue later! :Copy codeThe Code is as follows: [root @ snsgou ~] #
The unified encoding method is UTF-8, And the csv file encoding method is set to UTF-8.
Create a new table in the database. The column attributes must be consistent with the csv file. Set ** month ** to date format in csv, instead of string, in this
Mysql converts the character encoding of a table to UTF-8.Copy codeThe Code is as follows:Alter table tb_anniversary convert to character set utf8;
Modify mysql character encoding to UTF8
Step 1: view the current character encoding methodCopy
I. Data Tables
To ensure data integrity and consistency, you must specify the field name, field type, and field attribute when creating a table. Constraints, indexes, and ), primary key and foregin key.
Constraints:
Not null non-empty
The slow log in mysql is a log tool used to record SQL statements that have been executed for a long time (beyond long_query_time seconds.
Enable slow log
Set in my. cnf
[mysqld]
slow_query_log=on
slow_query_log_file=mysql-slow
Restart
A Case Study of MySQL database techniques to prevent human misoperation
This question is from internal student training by old boys. It is a database security technique)
A few years ago, the old boy personally encountered a "Murder Case". The boss
The developer writes a view. It takes 30 minutes for the select statement to be optimized. The view is as follows:
It may take more than 30 minutes for a developer to select:
21068 rows in set (1987.08 sec)
First, parse the following:
Mysql>
MySQL has provided the optimizer Option Switch option since 5.1. In this way, we can force some things that we think should not be done when the optimizer is confused, or when we want to see why the optimizer is so selective, you can manually
The default Character Set of installed MySQL is latin1. To change the character set to what you need (such as utf8), you must change the related configuration file; in linux, the default installation directory of MySQL is distributed in different
Mysql has many versions and storage engines. to select the most suitable system for business use, some verification is required. This article describes the mysql verification process and ideas.
It mainly involves:
Mysql version
V Mariadb
V Tokudb
V
Multi-table join relationships of SQL are: inner join, outer join, and cross join.
Create two tables for Demonstration:
TB_Characters:
Id
Character
1
Introverted
2
Extrovert
3
Neutral
1. After wamp is installed, run the WampServer program and go to the MYSQL console;
2. After Entering the console, the system prompts you to enter the password (no password is required because the password is blank). Press enter to enter;
3. Enter "
Export SQL files
Use phpmyadmin to export the database as an SQL file at your original website service provider.
Upload SQL files
As mentioned above, we have not installed ftp on the cloud host. How can we upload it?
Open the ftp client software,
Here I will only talk about some issues related to MySQL database installation.I have installed MYSQL before. It seems that I do not need to start the service manually, but I forgot to install the service manually. If mysql is not available just now,
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