1. Create a user. // Log on to MYSQL@> Mysql-u root-p@> Password// Create a userMysql> insert into mysql. user (Host, User, Password, ssl_cipher, x509_issuer, x509_subJect) values ("localhost", "pppadmin", password ("passwd "),'','','');In this way,
There is a server with a large volume of access traffic. There are nearly 600 million dynamic PVS per day, and the database query average is nearly times per second.On the other server, the program is the same as this one, but only about dynamic PVS
Back up old dataStop old ServerDelete the mysql service from the windows System Service and run the following command:C: \> C: \ mysql \ bin \ mysqld -- remove install mysql using an executable installation file, or decompress a binary compressed
When using mysql, you sometimes need to query records with unique fields. Although mysql provides the keyword distinct to filter out redundant duplicate records, only one record is retained, but it is often used to return the number of records that
Since I have been in school for so many years, I have come to the conclusion that learning from an example is the fastest and most effective, and can cultivate a strong practical ability. This is a good way to learn. Try not to access. For example,
MySQL supports two main table storage formats: MyISAM and InnoDB. InnoDB was used for a project last month. The results are very slow and only a dozen pieces can be inserted in one second. Later I changed to MyISAM format and inserted tens of
There are two different ways to add users: using the GRANT statement or directly operating the MySQL authorization table. The better way is to use the GRANT statement, because they are more concise and seem to have fewer errors.The following example
MySQL is "the most popular open database in the world", at least for MySQL Web sites. However, no matter how popular MySQL is, many companies are resistant to MySQL usage. This phenomenon comes from several reasons, some of which mistakenly think
This afternoon, I copied the data from mysql. After all the servers are configured, I found that the following errors were reported.
Copy codeThe Code is as follows:Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have
I found some information, and then I used the two functions concat () and left () in MySQL string processing ()1. CONCAT (str1, str2 ,...)Returns a string from the parameter link. If any parameter is NULL, return NULL. There can be more than two
Table a (id, type ):Id type----------------------------------1 12 13 2Table B (id, class ):Id class---------------------------------1 12 2SQL statement 1: select a. *, B. * from a left join B on a. id = B. id and a. type = 1;SQL statement 2: select
Status = show status like '%' [Example: show status like 'com _ select']Variables = show variables like '%' [Example: show variables like 'query _ cache_size ']
1. MySQL Query Count (status)Com_select; Com_update; Com_insert; Com_delete;
Small projects sometimes need to use keywords to search for relevance sorting. If sphinx appears to be a zombie, use order by of mysql to deal with it.Method 1:Copy codeThe Code is as follows:Select * from articles where (title LIKE '% keywords %')
After installing the MySQL support library for Python, I encountered a series of problems at one time. Fortunately, Google solved them all. Record it and forget it.1. Download the Python MySQL support libraryAddress:
Network Environment:HOST: Win7VirtualBox 4.1.4 + Ubuntu 11.10 server 64bitWhen the host uses a network cable, the client uses the Atheros AR8131 PCI-E Gigabit Ethernet Controller in Bridged Adapter mode to access the Internet.When the host uses
SQL statement used to query the disk space of all databases:
Copy codeThe Code is as follows:Select TABLE_SCHEMA, concat (truncate (sum (data_length)/1024/1024, 2), 'mb') as data_size,Concat (truncate (sum (index_length)/1024/1024, 2), 'mb') as
(1) The simplest modification method is to modify the character set key value in mysql's my. ini file.,For example, default-character-set = utf8Character_set_server = utf8
After modification, restart the mysql service, service mysql restartUse mysql>
Import csv:Copy codeThe Code is as follows:Load data infile '/test.csv' into table table_nameFields terminated by ', 'optionallyEnclosed by '"'escaped '"'Lines terminated by '\ r \ N'Ignore 1 lines;
Export csv:Copy codeThe Code is as follows:SELECT
01#! /Bin/sh02# Code by scpman03# Function: Check and fix mysql database tables04# Add the script to the timer. When the script is executed, it will read the database, list all the tables to be repaired, timing them, and start fixing.05# The damaged
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