However, I am not going to describe the implementation details of a storage engine or the advantages and disadvantages of various storage engines. I just want to describe how MySQL handles BINLOG and clarify several obfuscation problems.
BINLOG is
1. myisamchkTo use myisamchk, you must temporarily stop the MySQL server. For example, we want to repair the discuz database. Perform the following operations:# Service MySQL stop (stop MySQL );# Myisamchk-r/absolute path of the database file/* myi#
It seems that the string function of MySQL intercepts characters.
Program The interception (such as PHP or Java) is powerful, so we will make a record here and hope it will be useful to everyone.
Function:
1. Extract strings from the left
Left (
Dual-system configuration and MySQL database storage situation: the mysql database is stored in d: \ MySQL \ data under Windows XP, And the Linux system is Ubuntu Server 9.10.
After the dual-system is installed, use GURB to start to Ubuntu Server 9.
1. Check the system status
Check the status of the system by using some operating system tools, such as CPU, memory, swap, and disk utilization. Based on experience or compared with the normal status of the system, sometimes the system looks idle
1. How to obtain the latest MySQL version?
To install MySQL, you must first obtain the latest version of MySQL. Although we all know that MySQL can be found in FreeBSD Packages, I suggest you go to the network to find the latest version of MySQL. I
Let's talk about the character set of MySQL. In Windows, you can modify
PHP codeCopy codeThe Code is as follows: [mysql]
Default-character-set = utf8 // default character set of the Client[Mysqld]
Default-character-set = utf8 // default character
The following code is often used in php to obtain the SQL query statement for determining the date.
Copy codeThe Code is as follows: $ now = time (); // get the current date
$ SQL = "select * from 'team' where end_time> $ now ORDER BY sort_order
To randomly extract a record FROM the tablename table, the general syntax is: SELECT * FROM tablename order by rand () LIMIT 1.
However, I checked the MYSQL official manual. The prompt for RAND () indicates that the RAND () function cannot be used
Method 1. log on to mysql locally, change the "host" item in the "user" table in the "mysql" database, and change "localhost" to "%"
# Mysql-u root-prootMysql> use mysql;Mysql> update user set host = '%' where user = 'root ';Mysql> select host,
Use case when for string replacement
Copy codeThe Code is as follows :/*
Mysql> select * from sales;
+ ----- + ------------ + -------- + ------ + ------------ +
| Num | name | winter | spring | summer | fall | category |
+ ----- + ------------ + ----
For versions earlier than 4.0, varchar (20) refers to 20 bytes. If UTF8 Chinese characters are stored, only 6 characters can be saved (3 bytes for each Chinese character)
Varchar (20) is a version later than 5.0. It can contain 20 characters,
Later, I was working on WordPress. I didn't know that WordPress was using the InnoDB Data Engine at the beginning, so I built a database in the original database. I didn't find any problems at the beginning, it's okay to import the SQL statement. I
Regular mysql backup
Put/etc/cron. hourly/
Copy codeThe Code is as follows :#! /Bin/bash
DUMP =/usr/local/webserver/mysql/bin/mysqldump
OUT_DIR =/data1/backup/
DB_NAME = Database Name
DB_USER = Database User
DB_PASS = Database Password
# How much
XOR algorithm principle
From the main method of encryption, the location change method is too simple, especially when the amount of data is small, it is easy to guess the plaintext by the ciphertext, And the replacement method is an effective and
You cannot create one. the error of the frm file seems to imply an error in the file permission of the operating system or other reasons, but in fact, none of these are actually. In fact, this mysql error has been reported as a mysql bug and has
1. Download the RPM installation package. Because the software requires a dependency when installing MySQL, we recommend that you download all the installation packages and then install the RPM packages in sequence.
2. After installation in RedHat,
1. Add a user with the permission to access the master database on the master database server:
Grant replication slave on *. * TO 'test' @ '%' identified by 'test ';
(% Indicates that all IP addresses are allowed. You can specify the slave server IP
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