Environment:The MySQL database version on the master and slave servers is 5.1.34.Host IP: 192.168.0.1Slave IP Address: 192.168.0.2
1. MySQL master server configuration1. Edit the configuration file/etc/my. cnf# Make sure it is as downstreamServer-id
MySQL implements master-slave Replication
1. To make it easier for mysql to expand automatically as data grows beyond our expectation, and to implement mysql in LVM
1.1 create LVM
Create two new partitions, each of which is 5 Gb. My partitions
Because the business needs to add a sequence every month, it is expected to use the job to create a regular one year each time. Some problems encountered when writing this job are recorded here.
Step 1: Write the stored procedure for creating a
In general, the following two methods are used to perform a fuzzy query on the name field of the tb table in the Oracle database:1. select * from tb where name like '% XX % ';2. select * from tb where instr (name, 'xx')> 0;
If no index is added to
This error occurs.
IMP-00003: encountered Oracle error 1659
ORA-01659: cannot allocate MINEXTENTS more than 6 (in tablespace DATA)
IMP-00017: The following statement failed due to ORACLE error 1659:
After checking the information, it turns out that
Flashback is a technology applied from Oracle10g. It can be used to view the data of a database at a time point in the past, restore the database to a State at a time point in time, and restore tables that have been accidentally deleted. Use it to
Starting from 1gR2, Oracle introduced init. ohasd and configured it in the/etc/inittab to start and manage clusterware-related resources.
Pre 11R2
/Etc/inittab
H1: 2: respawn:/etc/init. evmd run>/dev/null 2> & 1
H2: 2: respawn:/etc/init.css d fatal>
During exp import, we often encounter the issue of inconsistent warning characters. The following describes how to configure the nls_lang parameter during imp/exp import and export.
It is recommended that the configuration of nls_lang be consistent
First look at a phenomenon:
19:33:31 hr @ ORCL (^ ω ^)Select Name, Value
19:33:59 2FromV $ mystat a, v $ statname B
19:33:59 3WhereA. statistic # = B. statistic #
19:33:59AndB.Name='Redo size'
19:33:59 5/
NAMEVALUE
--------------------
1. explain extended select .....Decompile the execution plan into a SELECT statement and run show warnings to obtain the query statement optimized by the MYSQL optimizer.
2. explain partitions select ....Used to EXPLAIN the Partition Table
3.
As soon as I opened the database and did nothing, I found that the hard drive lights went viral. Why? It is preliminarily determined that Oracle's scheduled task is running, but it is unknown which one is running.
Therefore, the first step is to
-- In this case, you need to add several constraints to the table. The syntax for adding constraints is as follows:-- Alter table name add constraint name constraint type (constraint field)-- Delete constraints:-- Alter table book drop constraint
NLS_COMP and NLS_SORT ParametersOracle uses binary for sorting by default, which is inappropriate for Chinese sorting, for example.Use these two parameters to specify the sorting method, such as pinyin or, which may cause performance problems.The
1 ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql. sock' (2)
MySQL not started
2 ERROR 1045 (28000): Access denied for user 'root' @ 'localhost' (using password: NO)
The password is incorrect. Modify the
1. view the size of all tablespaces
SQL> select tablespace_name, sum (bytes)/1024/1024 from dba_data_files2 group by tablespace_name;
2. view the idle tablespace sizeSQL> select tablespace_name, sum (bytes)/1024/1024 from dba_free_space2 group by
The installation of MySQL 5.5.27 is somewhat different from that of MySQL in the past, as follows: 1. Download cmakeTar./ConfigureMake & make install 2. groupadd mysqlUseradd-g mysqlMkdir-pv/usr/local/mysql/data 3. tar
Four Common mysql backup tools have their own disadvantages:
0 tarDisadvantage: Hot Backup is not supported. You need to disable the mysqld server before backing up. Mysqld must also be disabled during restoration.1 mysqldumpDisadvantages: MySQL
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