1. Load records in text files into MySQL database tables(1) Text File Format: one record per line. The field values are separated by the tab operator. The field order is the same as the order in the table definition. The uncertain field values are
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#
After mysql is installed, there will be a database named mysql. The table for storing users is user, and the user management of mysql database is centered on this table. Of course there are some tables, such: tables_priv, procs_priv, clumns_priv,
The following is the sample code. When an exception occurs, the exception information is stored in the log table and the subsequent statements are run.
If you have better suggestions, please kindly advise.
Example of handling Stored Procedure
Preparations
1 download apache http://httpd.apache.org/download.cgi#apache24 httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
Openssl indicates that the openssl module is included. You can use openssl to configure an SSL Secure link for Apache.
2
Recently, we have studied the implementation of MYSQL random extraction. For example, to randomly extract a record FROM the tablename table, the general syntax is: SELECT * FROM tablename order by rand () LIMIT 1.
There are two ways to achieve the
Mind Map
The most storage engines used in mysql are innodb and myisam. As the default storage engine of Mysql, myisam is worth learning. The following is my understanding of myisam mentioned in the High-Performance MYSQL. Please give me some
Basic Concepts
• Character refers to the smallest semantic symbol in human language. For example, 'A' and 'B;
• Given a series of characters, each character is assigned a value, which is used to represent the corresponding character. This value is
My. ini is in the MySQL directory, So I copied a my. ini file on my colleague's machine for modification and put it in a separate place as a backup. The content is as follows:
Copy codeThe Code is as follows: # Uncomment or Add only the keys that
The MySQL Manual also provides server-side parameters and parameter value descriptions. Currently, we need to pay attention to the server-side parameters that need to be modified or affect performance, it takes a lot of time to explain its usage and
Use case when for string replacement
Copy codeThe Code is as follows :/*
Mysql> select * from sales;
+ ----- + ------------ + -------- + ------ + ------------ +
| Num | name | winter | spring | summer | fall | category |
+ ----- + ------------ + ----
For large databases, it is very fast to load data to a TABLE without FULLTEXT indexes and then CREATE an INDEX using alter table (or create index. Loading data to a table with FULLTEXT indexes will be very slow.
1. Prerequisites for using Mysql full-
Problem (Multiple Primary auto-growth IDs are repeated)
1: First, we use the test table structure of A and B.
2: Drop A, insert the data table test (with an auto-increment ID) on B, and return the insert ID as 1.
3: Stop B and insert the data
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
If you want to connect to your mysql instance, this error occurs:
Copy codeThe Code is as follows: ERROR 1130: Host '192. 168.1.3 'is not allowed to connect to this MySQL server
Solution:
1. Change the table. It may be that your account is not
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
Next, let's take a look at how to restore the two ..
If slave_io_running is no, I personally think there are three situations. One is that there is a network problem and the connection fails. For example, I once used a virtual machine to build
Implementation of mysql two-way synchronous backup in windowsThe following articles mainly describe the correct operation solution for implementing master-slave synchronous backup of MySQL Databases in windows, on some related websites, I saw the
Usage of the is null statement in the mysql database
Note that in mysql, 0 or null means false while other values mean true. The default true value of Boolean operations is 1.
The special processing of null is in the previous chapter. To determine
1. Optimize Your MySQL query Cache
You 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
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