In the project, there is a need to split a table with a sheet that has been formed to preserve the large segment of the original table. A column that requires a child table is the primary key for the primary table.Database: MYSQLCase:Main Table:
Scene:When writing data in bulk, MySQL server has gone awayWorkaround:Set the Max_allowed_packet parameter a little larger in My.ini Show global variables like ' max_allowed_packet '; The above workaround does not solve the problem, other reasons
Operating system is CENTOS7 641, modify the/ETC/MY.CNF, add a line under the [mysqld] subsection: Skip-grant-tables=1This line of configuration allows mysqld to be not validated at startup2. Restart MYSQLD service: systemctl restart Mysqld3. Log in
#1, view table capacity spaceSELECTTable_schema,table_name,table_rows,ROUND(Data_length/1024x768/1024x768/1024x768) as 'data_size (G)',ROUND(Index_length/1024x768/1024x768/1024x768) as 'index_size (G)',ROUND(Data_free/1024x768/1024x768/1024x768) as '
MySQL Master-Slave introduction? MySQL master-slave is also called replication, AB replication. Simply speaking is a and b two machines from the back, write the data on a, the other B will follow the writing data, both data real-time synchronization?
Table lock MyISAM engine (table level)Read lock, can not write, write lock a table, other session can not read and write a tableRead lock session-1 can only check a table, can not check other B tableSession-2 write blocking, can query all
0 Select Now () Displays the current time.1 Select char_length (' Andyqan ') Displays the character length.Date of 2nd format Select Date_format (now (), '%y-%m-%d ')3 Add/Decrease Date Time Select Date_add (now (), Interval 1 day)4 Type
Always small table drive large table (small Data driven big data)In in1 form b wehre b.id=a.id) If the A table data is less than the B table data with exists ORDER by using the indexTwo ways to sort Mysql: Sort files, scan ordered index sortMYSQL
database is a very important part of information system, it is very important to manage it reasonably and efficiently. It is usually the total administrator who creates different administrative accounts and assigns different permissions to these
Create a stored procedureCREATE PROCEDURE myprocess ()BeginEndTo avoid a semicolon (";") in the stored procedure In the concluding sentence, we use a delimiter to determine whether the command is over.So we can use the $ sign as a closing (or
24.1 Database OverviewThe Digital Library (dtabase) is an existential data (Data) of the warehouse, theWarehouse isTechnical Photo OneData structures (data structures are exponentialThe form of a group or a link between data) to organize the
I. Introduction to MySQL PrivilegesThe simple understanding of MySQL permissions is that MySQL allows you to do what you do best, and you can't cross the border. For example, if you are only allowed to perform a select operation, you cannot perform
Composite Index principle:The leftmost prefix principle:Index (A,B,C)1, each query must have a, such as AB,AC,ABC, if not a, only the BC query will expire2, query with or, query invalidation3, the query with%*, invalid query.4, where a=* and B > and
MysqlData optimizationBasic steps for slow query optimization0. Run first to see if it is really slow, note the setting Sql_no_cache1.where condition single Check, lock minimum return record table. This sentence means to apply the where of the query
Install MySQL database in Centos7Before that, there was a blog that was manually compiled and installed in the REDHAD6 MySQL database below describes another in the CENTOS7 with the Yum Warehouse online installation MySQL database1. Preparation
Directory:1. Constraints 2. ALTER TABLE3. VIEW1. ConstraintsDescription: SQL constraints are used to specify the data rules in the table, and if there is a violation of the data behavior of the constraint, the behavior will be constrained to
Ask questions:???????? When using Rancher2.0.2 to deploy a MySQL deployment, we will find that if the MySQL container (pod) starts up only when the/var/lib/mysql data directory is set up, when the data directory and configuration directory are
We all know that the FOR UPDATE statement locks a table and the details of the lock table are not very clear to many people, let's take a look at the example below.We have an index on the table, as follows:Now in our store_id lock table by
MySQL Database basic Skills goals
Understand the basic concepts of a database
Mastering MySQL's compilation installation
Will operate the MySQL database
About MySQL Database
In the 21st century, humans bought the "era
Preliminary understanding of MySQL Basic database language1. Create a MySQL DatabaseCREATE DATABASE database_name;2. Show all MySQL databasesshow databases;3. Use a MySQL databaseUse database_name;4. Delete a MySQL databaseDROP DATABASE
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