The basic process of Mysqld_safe script execution:1, find Basedir and Ledir.2, find DataDir and my.cnf.3, to MY.CNF do some checks, specific check which options please see the comments in the attachment.4, parse the group [mysqld] and [Mysqld_safe]
Errors such as "Got a packet bigger than ' Max_allowed_packet ' or" MySQL server bytes has "occur when you import the database. This is typically because the currently imported data is larger than the maximum packet size of the system's limit. The
Assuming your database is MySQL, the classic "8-hour problem" may occur if the data source is improperly configured. The reason is MySQL by default, if a connection is found to be idle for more than 8 hours, the connection will be automatically
Before starting the installation, explain the difference between mysql-5.6.4 and the lower version of the installation, from mysql-5.5, MySQL source installation began to use CMake, so when we configure the installation directory./configure--perfix=/
Common Command differences for each version
Show InnoDB Status\g mysql-5.1
Show Engines InnoDB Status\g mysql-5.5
The user@ '% ' on grant authorization mysql-5.5 does not contain localhost
Second, MySQL 4.1/5.0/5.1/5.5/5.6 the main differences
1. View MySQL Database sizeSELECT sum (data_length) +sum (index_length)From INFORMATION_SCHEMA. TABLES where table_schema= ' database name ';The resulting result is in bytes, except 1024 is K, except 1048576 (=1024*1024) is M.
2. View the last
When you create a foreign key in MySQL, you are prompted with an error, but only a very simple message: Error 1005 (HY000): Can ' t create table ' db_qxztc.qx_userssssnew ' (errno:150). Does not solve the problem at all.
To see the detailed prompts
The MySQL order BY keyword is used to classify the data in the record.MySQL ORDER BY keyword classified by keywordThe ORDER BY keyword is used to classify the data in a record.
Copy Code code as follows:
SELECT column_name (s)
Considering the data security problem, prepare to migrate the database on the server to just mount the cloud hard disk, research, this method is the most reliable, share!
First set up the directory where the database will be migrated
Copy
MySQL's most common index structure is btree (O (n)), but there are always situations where we want to use other types of indexes for better performance. Hash is one of the options, for example, when we retrieve the user ID by user name, they are
The default scheduling policy for MySQL can be summarized as follows:· Write operations take precedence over read operations.· Writes to a data table can occur only once at a time, and write requests are processed in the order in which they arrive.·
Copy Code code as follows:
Set global log_bin_trust_function_creators = 1;
DROP FUNCTION IF EXISTS rand_string;
DELIMITER $$
CREATE FUNCTION rand_string (n INT)
RETURNS VARCHAR (255)
BEGIN
DECLARE chars_str varchar () DEFAULT '
In web development, we often need to insert data from one table into another, and sometimes we need to specify an import field that only needs to import records that don't exist in the target table, although they can be split into simple SQL in a
The COALESCE function can accept more than one argument and returns the first Non-null value of those arguments, or null if all the supplied arguments are nullThe Ifnull function, like the COALESCE function, can only accept two parametersThe IF
MySQL database provides two types of indexes, if not set correctly, the efficiency of the index will be greatly compromised but the problem is completely unknown.
Copy Code code as follows:
CREATE TABLE Test (
ID INT not NULL,
Today, when deploying an experimental system, quote the following error:
Your ' max_allowed_packet ' variable is set to less than 16777216 Byte (16MB).
It's also easy to understand that you need to modify MySQL's configuration file, but there's
Detect if event is turned on
Copy Code code as follows:
Show variables like ' Event_scheduler ';
2. Open Event
Copy Code code as follows:
Set global Event_scheduler = on;
3. Create a stored
This article describes the MySQL relocation data Directory implementation method. Share to everyone for your reference. The specific methods are as follows:
MySQL allows you to reposition the data directory or its members, and here's how to
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