1. view the configuration file:
Skip-networking # comment out because it shields all TCP/IP connections
Bind-address = 127.0.0.1 # It is the same as the previous option. To connect remotely, comment out
2. If you have done all of the above work,
Baidu consulted some materials and combined with some of its own experience, adopted the following solutions:
CopyCodeThe Code is as follows: $ idlist = '';
For ($ I = 1; $ I If ($ I = 1 ){
$ Idlist = mt_rand (3,25216 );
}
Else {
$ Idlist = $
CopyCodeThe Code is as follows: alter table 'database name'. 'table name' add column 'procid' varchar (6) default ''after 'ppidchanged ';
-- In MySQL, if the table name, database name, and column name are used, you must use the accent symbol on the
CopyCodeThe Code is as follows: $ Uname = $ _ post ["username"];
$ Pwd = $ _ post ["password"];
$ Link = mysql_connect ('localhost', 'root', '123 ')
Or die ('could not connect: '. mysql_error ());
Mysql_select_db ('ruida ') or die ('could not
Myisam_max _ [Extra] _ sort_file_size is large enough
Delay_key_write reduces Io and improves Write Performance
Bulk_insert_buffer_size
Set concurrent_insert to 2.
Read_rnd_buffer_size random Scan
Read_buffer_size sequential table Scan
Three
The table sharding logic here is based on the number of user_name groups in the t_group table.
In this case, the index on the user_name field is a bad index. It does not have any obvious effect.
1. test procedure. Delimiter $Drop procedure't _
Show tables or show tables from database_name; // display the names of all tables in the current database
Show databases; // display the names of all databases in MySQL
Show columns from table_name from database_name; or show columns from
These two days make it difficult to query a data. The main reason is that the understanding of group by is not deep enough. This is the case.
I think many people have met this requirement. Below is my content table simulation
CopyCode The Code is
Recently, I got a MySQL script file of dozens of MB, which is ready to be restored to a database.
I used mysql-front for a short time. I tried it first and the result was suspended.
In this case, create an empty database with MySQL-front and
CopyCode The Code is as follows:
/*--------------------------------System: Pt book-Pt novel thiefCode: James pakey-----------------------------------*/
$ Pt_mysql = new dbquery;
/*** MySQL Query Class**/
Class dbquery {/*** Total number of
To update PHP with Yum, you only need to use one command:
CopyCode The Code is as follows: # Yum update PHP
But the problem arises. After using this command, the system tells me that no updatable package is found. The current PHP version is only 5.
Date_add (Date, IntervalExpr Type) Date_sub (Date, IntervalExpr Type)
These functions perform date operations.DateIs a datetime or date value, used to specify the start time.ExprIs an expression used to specify the time interval value added or
Drop procedure if exists pro_rep_shadow_rs;
Delimiter |
----------------------------------
-- Rep_shadow_rs
-- Used to process information addition, update, and deletion
-- Only data that has not been updated since the last time is updated each time.
Php saves data to mysql
We plan to clean up data before warehouse receiving at the dao layer, such as varchar trim and int for intval.
One day, I suddenly remembered that the value range of php intval is the same as that of mysql's int type?
I
For the description of the valid format of the value range of each type and the specified date and time value, see 7.3.6 Date and Time type.
Here is an example of using the date function. The following query Selects all records. The value of
So yesterday, I did it seriously. I have more features and can perform statistical analysis on various search engines. It can be viewed in multiple time periods. In fact, the code is very simple. For the sake of simplicity, the code is compressed to
When a record is inserted in a table in SQL or MySQL databases, a trigger is triggered to insert the same record to another table in the same database.
In the course of learning, we find that the two are written differently.
1. Create two SQL
The installation graphic tutorial of MySQL is for beginners. Currently, MySQL 5.0.91 is the latest stable version.
Mysql http://www.jb51.net/softs/2193.html
The following is an example of MySQL installation. It is installed using an executable file!
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