Installing and configuring MySQL
Mysql-shareware-3.22-win.zip
Installed in C:mysql
MY-EXAMPLE.CNF Copy to c:my.cnf under C:mysql
Change the #basedir=d:/mysql/in the file to basedir=c:/mysql/
Remove the semicolon before the Extension=php3_mysql.dll
What is a table partition
A table partition is a large table, divided into several small tables according to the conditions. Mysql5.1 began to support datasheet partitioning.For example, if a user table has more than 6 million records, the table
If it's myisam. Just change the name of the library name folder under the data directory OKIf it's innodb. It is not possible to modify the name of the library. Rename database or ALTER DATABASE is not a good place to be on the Internet blind 咧咧.
(1) MySQL replace functionSyntax: replace (object,search,replace)Replaces all occurrences of search in object with replace
The code is as follows
Copy Code
Update ' News ' Set ' content ' =replace (' content ', ', ', ')//
PROCEDURE analyse gives suggestions for optimizing each column of an existing table by analyzing the results of the select query.The syntax for PROCEDURE analyse is as follows:SELECT ... From ... WHERE ... PROCEDURE analyse
Requirements: Check out the average score of 2 and 2 people who fail.There are two types of query statements that are often used:
The code is as follows
Copy Code
1. Select Name,sum (Score =2;
Look again
Count
First, let's talk about why you want to divide the table.
When a single piece of data reaches millions of, you'll have more time to query, and if there's a joint query, I think I might have died there. The purpose of the table is to reduce the
Problem phenomenon:
The day before yesterday to the MySQL database migration operations, B Machine (new) of the MySQL and a machine version of different, for the convenience of B machine installed MySQL directly copy a machine's data directory
The code is as follows
Copy Code
Inquire TodaySELECT * FROM table name where To_days (Time field name) = To_days (now ());Yesterday SELECT * FROM table name WHERE to_days (now ()) –to_days (Time field name) 7 days SELECT * FROM
MySQL under Windows
(for administrators or users with global permissions to reset another user's password)
Enter command line mode
The code is as follows
Copy Code
Mysql-u Root MySQLmysql> UPDATE user SET
Problem analysis
Error causes, some netizens say is frequent query and update [datasheet] table caused by indexing error, because my page is not static generation, but dynamic page, so I agree with this argument. It is also said that the MySQL
1, Mysql Errono 1005: The primary foreign key is not exactly the same, please check the following points:
A, whether the field existsb, the type is consistent (note unsigned, powerdesign generation problem)C, the database engine is consistentD,
The syntax for explain is as follows:
Explain [extended] select ... from ... where ...
If you use extended, you can use the show warnings statement to query the appropriate optimization information after you finish executing the explain statement.
Recently this period of time to study node feel good, I made a change to check, although some simple, but the idea is figured out, in fact, all items are additions and deletions to help beginners quickly grasp node
First of all
This example is
Combined with the information on the Internet, personally to install a MySQL, installed version is win7x64 5.7.16.
The following issues occurred during the installation and resolved:
1. "MySQL Service failed to start service did not report any
Objective
The most common operation of C # to manipulate MySQL's large amount of data is to select the data and then process the data in C # before inserting it into the database. In short, select-> process-> Insert three steps. For small amounts
I. Characteristics and comparison
The MySQL extension of PHP is an early extension of design and development that allows PHP applications to interact with MySQL databases. The MySQL extension provides a process-oriented interface and is designed for
One of the ways to recover MySQL root passwordIf you forget the MySQL root password, you can reset it in the following ways:1.KILL off the MySQL process in the system;Killall-term MySQLd2. Start MySQL with the following command to start without
Connect to the MYSQL database through PHP$ Conn = mysql_connect ("localhost", "root", "password") or die ("unable to connect to database ");Mysql_select_db ("table", $ conn) or die ("data source not found ");------------------------------------------
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