Mysql cache function analysis:
1. The key Generation Principle of the mysql cache function is to generate a unique key based on the select statement according to certain hash rules. The select result generates a value, that is, key =>
The file format used by MySQL to store data has been widely tested, but there are always external conditions that can cause damage to the database table:
The mysqld process is killed in a write; the computer is accidentally shut down (for example,
DocumentWhen you create a foreign key reference constraint, the following error message about error code 105 is displayed:ERROR 1005 (HY000): Can't create table './test/role_resours.frm' (errno: 150)You can solve this problem from the following
Use SQLyog to analyze the MySQL database:
SOLyog is easy to download, install, and use. I went to the relevant website to download it. It is only kb in size. Install two Files (one Executable File .exe and one dynamic link library file. dll) to the
MySQL has become one of the most widely used databases on the network, especially for Web applications. It occupies the absolute advantage of Small and Medium applications. All of this comes from its small and easy-to-use, secure and effective, open
MySQL currently does not support column Default as a function. If the Default value of a column is the current update date and time, you can use the TIMESTAMP column type.The following describes the TIMESTAMP column type in detail:TIMESTAMP column
Mysql 5.1 supports triggers and UDF features. If libmemcache and Memcached Functions for MySQL are used together, memcache can be automatically updated. Record the installation and testing steps.Installation StepsInstall memcached. This step is
Method 1:Root User Login System/Usr/local/mysql/bin/mysqladmin-u root-p password New passwordEnter password old passwordMethod 2:Log on to the mysql database as a root user.Mysql> update mysql. user set password = password ("new password") where
You can use load data infile to import a *. csv file to mysql,
Summary:
Load data [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.csv'
[REPLACE | IGNORE]
Into table tbl_name
[FIELDS
[Terminated by 'string']
[[OPTIONALLY] enclosed by 'Char
In daily work, mysql is used simply, so the Common commands are summarized as follows:Use of the mysqldump command:Back up and export DatabasesMysqldump-h database_ip-u Username-p -- opt databasename> backup-file. SQLExport only the database table
With regard to the Mysql database BACKUP method, helper's editor summarizes all the current BACKUP methods, including mysqldump, mysqlhotcopy, backup table, SELECTOUTFILE, or binlog backup, or directly copy data files and related configuration files.
On PyCon, some kids shoes share similar concepts, but it is not suitable for general Internet projects. It feels a little too different. However, I implemented this solution before seeing PyCon's sharing. The same requirement is different. Here, I
1. Optimize Your MySQL query CacheYou can enable the High-Speed query cache for queries on the MySQL server. It is one of the most effective ways to improve performance by quietly processing the database engine in the background. When the same query
Mysql "on duplicate key update" SyntaxIf the on duplicate key update is specified at the end of the INSERT statement and the DUPLICATE value appears in a UNIQUE index or primary key after the row is inserted, UPDATE is executed ON the row with the
First, let's take a look at the formula. MySQL memory is divided into two parts: global memory and thread memory (not all, but the most influential part ):Copy codeThe Code is as follows:Per_thread_buffers = (read_buffer_size + read_rnd_buffer_size +
In the development process, you sometimes need to remotely connect to and manage the MYSQL database on another machine. in the implementation process, you may encounter a series of problems, now, we use remote access to mysql data installed on
Method 1: Use the SQL Server proxy (Alert + Job)The procedure is as follows:1. First, use the following command to enable the trace flag.SQL codeDbcc traceon (3605, 1204, 1222,-1)Note:3605 output the result of DBCC to the error log.1204 return the
When reading the mysql user manual, I saw the mysqlimport command for Backup recovery, and a strange problem occurred after the operation.Copy codeThe Code is as follows:Root @ zhou:/usr/local/mysql # mysqlimport-uroot-p123-h127.0.0.1-P3306 test
We often encounter the problem of setting the current time as the default value in MySQL. The following describes how to set the current time as the default value in MySQL.Database: test_db1Create Table: test_ta1Two fields: id (auto-increment and
-- Truncates a string from a character and inserts another string hereSelect stuff ('Hi, world! ', 4, 4,' ***** ') -- Return Value: hel*** orld!-- Returns a string of the specified length starting from the specified position.Select substring ('hello,
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