I. Mode
Ii. stored procedures and functions
Syntax:
Create procedure sp_name ([proc_parameter [,...])
[Characteristic...] routine_body
Create function sp_name ([func_parameter [,...])
RETURNS type
[Characteristic...]
The system database needs to be backed up in real time. However, the webservice data backup method previously considered has a great impact on the program running efficiency. After checking the data, mysql can set the master-slave server to back up
Current configuration problem found (mysql + linux Online System)Show global status like open % tables %;+ --------------- + ------- +| Variable_name | Value |+ --------------- + ------- +| Open_tables | 966 || Opened_table | 2919 |+ ---------------
Mysql queries the maximum number of tables caches:Show variables like table_cache; Run the following command to query the opened descriptor in mysql:Show status like open_tables; 1. Adjust table cacheThe table_cache parameter sets the table cache
Mysql Databases use a plug-in storage engine. If the storage engine has been installed on the Mysql server, you can also add or uninstall the storage engine. In Mysql5.1, if the -- with-plugins = innodb parameter is not used during source code
I set the root password for mysql I just installed yesterday. Today I cannot get in.I used a common solution. As follows:1. Send the kill command to the mysqld server to disable the mysqld server (not kill-9). The files that store the process ID are
Mysql executes External SQL If there is an external SQL file named "mydb. SQL"; to create a table, assume that the database is "mydb ";1. mysql is not logged on:Java codeMysql-uroot-p1234 // Absolute path, which can be enclosed in single quotesMysql-
Mysql Master/Slave always has an error in the function process. Analysis of MySQL function creation problems:According to the system prompt, the cause of this error may be a security configuration. The log_bin_trust_function_creators parameter in
In short, the table id cleared with truncate will be from the new record, while the table cleared with delete will not continue with the original data record from the new record. Of course, the id here is self-increasing==============================
1. software acquisition
You can obtain a stable version of mysql5.1.58 from the official website. Select souce code to download the package installation file.
If the host is directly connected to the public network, you can use the following
Mysql master-slave synchronization deployment:
Master: 192.168.2.67
Slave: 192.168.2.211
The slave database of the master node has been running for a period of time.
Master:
Vim/etc/my. cnf
Server-id = 1 master id
Log-bin
The following statements may be used for conditional data insertion in MySQL. Create a simple table for testing:
Create table 'books '(
'Id' INT (11) not null AUTO_INCREMENT,
'Name' VARCHAR (200) not null,
Primary key ('id '),
Unique key 'newindex1
Mysql5.5 uses the new configuration tool cmake. Therefore, during compilation and installation, make sure that cmake has been installed in your system, the redhat system can be viewed using rpm-qa | grep cmake. Another simple method is to directly
This error occurs when you use MySQL-Front to connect to mysql.ERROR 1130: Host 10.5.9.168 is not allowed to connect to this MySQL server1. Change the table. It may be that your account is not allowed to log on remotely, but only on localhost. At
When inserting data into a table, you often encounter this situation: 1. First, determine whether the data exists; 2. If the data does not exist, insert the data; 3. If the data exists, update the data.
In SQL Server, you can perform the following
MySQL causes Chinese garbled characters for the following reasons:1. Problems with server settings, such as staying at latin12. table language setup problems (including character and collation)3. Connection language settings for client programs
Today, the user access to the voting system of the newly deployed project is very slow. The voting system is based on the PHP environment and uses short connections to access the mysql database. The CPU load of the monitored database PHP server is
Export files from the server using the mysqldump command
When importing data to another database, the following message is displayed:
MySQL returns:
#1064-You have an error in your SQL syntax; check the manual that corresponds to your MySQL
1. Create a stored procedure
1. Basic Syntax:
Create procedure sp_name ()
Begin
.........
End
Ii. Call the Stored Procedure
1. Basic Syntax:
Call sp_name ()
Note: The stored procedure must be enclosed in parentheses, even if the stored procedure is
Query yesterday's data select * from faq where answer_time = date_sub (curdate (), interval 1 day );
Query the data for this month: select name, submittime from enterprise where date_format (submittime, '% Y-% m') = date_format (now (),' % Y-% m
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