How to configure the MYSQL database:Generally, you just need to modify my. ini and point it to the database directory.Liu yongfa (yongfa365) Blog has tested the simplest method:1. net stop mysql2. Open C: Program FilesMySQLMySQL Server
1. MySQL concurrency and Isolation Control Mechanism
Meta-data metadata lock: Implemented in the table cache and provides isolation for DDL (Data Definition Language. A special meta-data metadata type called Name Lock. (SQL layer)
Table-level data
Start: net start mySql;
Enter: mysql-u root-p/mysql-h localhost-u root-p databaseName;
List databases: show databases;
Select Database: use databaseName;
List tables: show tables;
Show columns from tableName;
Create a database: source
Environment:Master server: centos 5.2 mysql 5.1.35 source code IP: 192.168.1.22Slave server: centos 5.2 mysql 5.1.35 source code IP: 192.168.1.33Configuration:I. master server1.1 create a replication user with the replication slave permission.Mysql>
Before MySQL5.1, general log cannot be enabled or disabled at run time. Sometimes it is very troublesome to capture SQL to find the problem. By chance, I found a good tool: mysqlsniffer, which can be used to capture SQL statements, the help is as
Write down the steps and update them at any time for any problems. Here I synchronizeDatabaseIs TEST1,EnvironmentDescription.HOST: 192.168.0.167 ()HOST: 192.168.0.20.( B)MYSQL version 5.1.112. Authorize the user.A:Mysql> grant replication slave,
In linux, it is often the case that VBB is used in a forum system such as slow, mysql is suspended, and there are too many sleep processes. As a result, the system was completed for dozens of users.In fact, this is the problem of mysql configuration,
For example, if there is a post reply table, posts (id, tid, subject, message, dateline ),Id is the auto-increment field, tid is the id (foreign key Association) of the reply topic post, subject is the reply title, message is the reply content,
In practical work, regular database backup is extremely important. When using MySQL, we have a lot of options for database backup. This article will introduce you to how to use MySQL mysqldump to back up the database.
I. Importance of Data Backup
At
By default, MySQL supports three engines: ISAM, MyISAM, and HEAP. The other two types are InnoDB and Berkley (BDB )...... ISAM
ISAM is a well-defined and time-tested data table management method. It is designed to take into account that the number
This is a class library written in VB.net to connect to MySql. You can use this class library to directly operate MySql databases.
Before using this class library, you must installOdbc mysql 3.51:
Extract data from MySQL today. After using ROLLUP statistics, add the project name to the left column of the data and use SQLSQL codeSELECT (case when isnull (PLAYERNO) then playerno = total else playerno end) as playerno, SUM (AMOUNT) FROM
1. Modify the mysql Log PathVim/etc/my. cnfLog-bin = mysql-binTo:Log-bin =/$ PATH/mysql-binAfter modification, save and exit.Modify the mysql-bin.index file to modify the path to an existing log.The default value is./mysql-bin .....Change to/$
1.1 backup
Mysqldump adopts an SQL-level backup mechanism. It imports data tables into SQL script files and is suitable for upgrading between different MySQL versions. This is also the most common backup method.
Here are some main parameters of
Mysqldump
Back up the entire database
Mysqldump-u root-ppassword databasename> data. SQL
// Enter the root password.
Back up one or more tables
Mysqldump-u root-p databasename table1name table2name> data. SQL
// Enter the root password.
1. If the Key is null, the column value can be repeated, indicating that the column has no index or a non-leading column with a non-unique composite index.2. If the Key is PRI, this column is an integral part of the primary Key.3. If the Key is UNI,
On a MySQL server with heavy load, you may occasionally see connection timeout errors, such as: Can't connect to MySQL server on 'mydb' (110 ). If you have multiple connection requests at the time, you will find other connections are okay. This type
When importing mysql Data today, the following error occurs:Mysql> load data infile '/root/aaa' into table test fields terminated by', 'Lines terminated by '\ n ';Mysql> ERROR 13 (HY000): Can't get stat of '/root/aaa' (Errcode: 13)At first, I
Reset the root passwordMethod 1: Add the following content to the [mysqld] field of my. ini:Skip-grant-tablesRestart the mysql service. mysql can log on to the database without a password.Then go to mysqlMysql> use mysql;Mysql> update user set
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