In the Windows Server
Locate the php.ini file for the PHP installation directory and then we searchExtension=php_pdo.dll this line to see if there is a semicolon in front of the line, and if so, remove it. and find out if there are any
It can be solved with the following techniques.
Also like user registration, the same time broken, a large number of users registered. can be cached and written to the database at once.
The code is as follows:
The code is as follows
SELECT ... A select in the form outfile ' file_name ' can write the selected row to a file. The file is created on the server host, so you must have file permissions to use this syntax. File_name cannot be an original file. An existing file prevents
Today, after the bulk deletion of the Myiam datasheet, found that there is no recycling, after checking the data, found to be through the optimize table to reclaim spaceTest the following to establish a data table:
The code is as
PHP Tutorial Small Database Tutorial (do not use the MySQL tutorial to do the website)Include ' pdbm.php ';
$timestart = Explode (', microtime ());$timestart = $timestart [0] + $timestart [1];
$PDBM = new pdbm (' Test ');$PDBM->open (pdbm_creat |
4. User module Design
For the underlying database, call the MySQL C API function for database modification, internal save
A certain state variable (for example, user name, or leave it to the previous level?) ), on the previous layer,
Optimizing MySQL database queryThe simplest and safest format, which is the fastest in the disk format. Speed comes from the ease with which data can be found on disk. When the lock has an index and the static format something is, it's very simple,
MySQL is crazy to eat memory, just started the memory only accounted for 700M, Half a day after 1.5G, running 2 days after the 3G memory, including FP, previously restarted MySQL down, so I set the scheduled task to automatically restart MySQL every
The code is as follows
Copy Code
SELECT * from TB where c> date_format (' 2007-07-06 ', '%y%m%d ') and C SELECT * from TB where c> date (' 2007-07-07 ') and c
Statday is a Date data field of type 2006031001
The
Set MySQL installed in C: disk, MySQL database username is root, the password is 123456, the database name is database_name, in D: Packing directory to store the backup database, the backup database name is Backup20070713.sql ( 20070713.sql for
The now () function gets the current date and time:Select Now ();/*+---------------------+| Now () |+---------------------+| 2009-05-18 20:11:24 |+---------------------+1 row in Set (0.02 sec)* * Ah, this function is often used by me, nothing just
MysqlimportExamplemysqlimport-uroot-p123456 Test/tmp/mytbl.txt;Convention: The last part of the file name is the table name, and the above statement is imported into the table MytblMysqlimport must specify the database, the above statement database
MySQL Replace into instance tutorial
Replace into and insert into the difference, I and he said in the evening my blog look at that time is busy, now from the MySQL manual to find something, the MySQL manual said replace into said or more detailed.
The first step should be to do is to troubleshoot problems, to find bottlenecks, so, start with the logTurn on slow query log
Mysql>show variables like "%slow%";
To view the slow query configuration, not add to the MY.CNF, as
The code is as follows
Copy Code
Mysql-u root-pmysql> use MySQL;Mysql> grant all privileges in *.* to root@ '% ' identified by ' root ';Mysql> select Host,user,password from user; + ———— –+--+ ——————————————-+| Host | user |
Modify the phpmyadminconfig.inc.php files in the phpMyAdmin site for this machine
Find this line and change the ' localhost ' after [' host '] to remote database IP
The code is as follows
Copy Code
$cfg [' Servers ']
A summary of Linux under the MySQL some of the commands:
1.Linux under the command to start MySQL:Mysqladmin start/ect/init.d/mysql Start (Previous installation path for MySQL)
2.Linux Restart MySQL command:Mysqladmin restart/ect/init.d/mysql
Problem analysis
Innodb_buffer_pool_size = 2048M Set too large, adjust to Innodb_buffer_pool_size = 1024M can
Solutions
Find MY.CNF and set the innodb_buffer_pool_size to fit.
# might is limited to 2-3.5g the user level memory the per process#
Under normal circumstances MySQL startup error is very easy to troubleshoot, but today we have to say that the situation is not general. Get a server, install MySQL after the boot, startup error is as follows.
Some classmates say, dude, are you a
7.2.9 how does MySQL optimize order?In some cases, MySQL can directly use indexes to satisfy an order by or group by clause without additional sorting.Although order by does not match the ORDER of the index, the index can still be used, as long as
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