The constant global event_scheduler of MySQL must be on or 1 for the timer to function.
--See if the timer is turned on
Show VARIABLES like '%sche% ';
--Open Timer 0:off 1:on
SET GLOBAL event_scheduler = 1;
--Create Event
--Automatically calls
First of all to declare: Under normal circumstances, to modify the MySQL password, authorization, is required to have the root of MySQL permissions.
Note: This operation is at the win command prompt, phpMyAdmin is also applicable.
User: Phplamp user
1.order by Rand ()The data is very slow, the randomness is very good, suitable for very small amount of data.
Copy Code code as follows:
SELECT * FROM table_name as R1 JOIN (select ROUND (RAND () * (select ABS (MAX (ID)-min
The day before yesterday because the work required me to take a random few records from a database of 5W records, here I am directly using the MySQL rand by function to direct, thousands of records okay, but if the tens of thousands of feeling to a
Its encapsulated MySQL simple Operation class, has been stuffed in the Ben Framework, based on PDO to write, the code has some nonsense style ...
mysql.class.php
server = $server;
$this->database = $database;
$this->user = $user;
Mysqld_safe is recommended for use in UNIX and NetWare to start the MYSQLD server. Mysqld_safe adds some security features, such as restarting the server when an error occurs and writing Run-time information to the error log file. The specific
The most common way to execute a GROUP BY clause is to scan the entire table and then create a new temporary table in which all rows of each group in the table should be contiguous, finally using the temporary table to locate the group and apply the
Repeatable-read can be read repeatedly, and the contents of the Select table in set autocommit= 0 or start transaction state will not change. This isolation level may result in something that has been read that has been modified.
Like what:
Read a
My MySQL is the default UTF8 encoding, the database is also set up UTF8 encoding, the use of the program can add Chinese data, in CMD Use SQL statement new data are reported similar to incorrect string value: ' \xb2\xe2\xca\xd4 ' for Column ' title '
Indexes do not always take effect, such as the following situations, which will result in index invalidation:
1. If there is an or in the condition, it will not be used even if there is a conditional index (which is why the use of or is as little
Table_cache is a very important MySQL performance parameter, which is called Table_open_cache in the 5.1.3 version. Table_cache is primarily used to set the number of table caches. Because each client connection accesses at least one table, the
For large web sites such as Facebook,ebay, if there is no memcache as an intermediate cache layer, data access is not possible do, for the general web site, as long as the independent server, can be configured memcache improve the speed of Web site
Compile and install the first MySQL 5.1.33
cd/opt
/usr/sbin/groupadd mysql
/usr/sbin/useradd-g mysql mysql-s/bin/nologin-d/usr/local/mysql
Tar- ZXVF mysql-5.1.33.tar.gz
cd
Copy Code code as follows:
CREATE definer= ' root ' @ ' localhost ' PROCEDURE ' createbusiness ' (parameter1 int)
BEGIN
#Routine body goes ...
DECLARE flag int DEFAULT parameter1; #声明变量flag, assign a parameter value to the variable
DECLARE
1. mysql to back up a database command
Copy Code code as follows:
##################################################################
# Back up a database
##################################################################
#
Many developers will meet the "Mysql:error 1040:too many Connections" exception, which is caused by a high volume of traffic, MySQL server can not withstand, this time to consider increasing the spread from the server read pressure Another reason is
This error occurred in the Web site event log:
Event Type: ErrorEvent Source: MySQLEvent Type: NoneEvent id:100Date: 2012-8-14Event: 8:07:59Users: N/AComputer: AbcserverDescribe:
Copy Code code as follows:
Cannot find or open table
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