the existence of a foreword problem
from the code level, that is, the application level to consider the security of the code (that is, regardless of the underlying language itself, such as the vulnerability), the scripting security problem is the
In contrast, the first is to use the MySQL stored procedures to get:
Copy Code code as follows:
Mysql>delimiter $
Mysql>set autocommit = 0$$
Mysql> CREATE PROCEDURE Test ()
Begin
Declare i decimal (a) default 0;
Dd:loop
1, the Sub-Library table
Obviously, a primary table (that is, a very important table, for example, user table) Unlimited growth is bound to seriously affect performance, the library and the table is a very good solution, that is, the performance
Copy Code code as follows:
Delimiter | |
DROP FUNCTION IF EXISTS is_mobile| |
CREATE FUNCTION is_mobile (x VARCHAR (255)) RETURNS TINYINT (1)
BEGIN
DECLARE result TINYINT (1) DEFAULT 0;
SET x = LCASE (x);
IF Right (x,4) = '. mp4 ' THEN
0. Create a table
CREATE Table Table name (property name data type [integrity constraint],
property name data type [integrity constraint],
property name data type [integrity constraint])
Integrity constraints are certain special
Group Query GROUP BYGroup BY property name [having conditional expression] [with Rollup]"Property name" means grouped by the field value, the "Having conditional expression" is used to limit the display after grouping, the result of the condition is
I. Overview
This section describes using cursors to bulk table operations, including bulk index, bulk add fields, and more. If you are not familiar with stored procedures, variable definitions, preprocessing, read the previous articles on these
I. Overview
A reference to the stored procedure may lead to another topic is the advantages and disadvantages of stored procedures, there is no discussion, the general people ask me to answer you think it is good you use it. Because the syntax of
MySQL Master-slave replication (replication sync) Now enterprise use more, also very mature. It has the following advantages:
1. Reduce the pressure on the primary server, you can perform query work from the library.
2. Make a backup from the
Learn PHP will have to mention MySQL, although there are phpmyadmin such tools can be graphical operation of the database, but I still want to learn PHP to use the command line to manipulate the database. Here's a summary of my studies, including
This paper analyzes the difference between create table as and like in MySQL. Share to everyone for your reference, specific as follows:
For MySQL copy the same table structure method, there are create table as and create table like two kinds, what
The bibliography used in the user verification is recorded in the datasheet, and now I want to take out all the bibliographies, using distinct and group by to get the results I want, but I find that the return results are arranged in a different
MySQL query results are converted to a PHP array of several methods of the difference:
$result = Mysql_fetch_row (): This function returns an array with numbers as the subscript, and you can only refer to them by $result[0], $Result [2].
The approximate steps are:
Add the configuration file: Skip-grant-tables parameters, upgrade the Basedir into a new version, start MySQL, execute the command: Mysql_upgrade upgrade the dictionary information, and then flush privileges; Refresh the
Version number: 5.5.19-winx64
1, change the My-small.ini to My.ini (please follow your own machine configuration changes)
2, at the command line input:
\bin\mysqld–-console return should see the following indicating successful startup:
The MySQL manual also has the server-side parameter explanation, as well as the parameter value correlation explanation information, now is for us everybody important attention, needs to modify or affects the performance the server side parameter,
1.mysql Remote Connection command can import exported data remotely
Mysqldump--default-character-set=gb2312-h255.255.000.00-uroot-pxxxxxx Mydatabase>d:\data.sql
Export the specified database to an external SQL file!
Restore
Here are some specific implementation methods.
The establishment of the experimental environment is as followsMysql> CREATE TABLE TBL (-> ID int primary KEY,-> Col int->);Query OK, 0 rows affected (0.08 sec)
mysql> INSERT INTO TBL values-> (1,26),-
Version 4.0 below, varchar (20), refers to 20 bytes, if stored UTF8 Chinese characters, can only save 6 (each Chinese character 3 bytes)
5.0 version above, varchar (20), refers to 20 characters, whether stored in numbers, letters or UTF8 characters (
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