This tutorial is primarily configured with the Windows 2008 SP2 32bit standard to configure PHP 7.0rc2+nginx 1.9.4+mysql 5.6.26, and to turn on HTTPS access.
First, preparatory work
1, Nginx+php+mysql and other downloads and decompression: Baidu
MySQL Stored procedure creation syntax
The code is as follows
Copy Code
CREATE PROCEDURE and create FUNCTION CREATE PROCEDURE sp_name ([proc_parameter[,...]]) [Characteristic ...] Routine_body CREATE FUNCTION sp_name
Method One:
The code is as follows
Copy Code
SELECT * FROM TableName ORDER by rand () limit 1
Change the value of the limit back to the number of bars you want to randomly extract, and take only one.
Method
Mysqli encapsulates some advanced operations, such as transactions, while encapsulating many of the methods available during DB operations.
The most widely used place is the mysqli business.
Like the following example:
The code is as
mysql2xml.php class file: For backup mysql data!!
The code is as follows
Copy Code
Class Mysql2xml {protected $conn;protected $result;protected $tables;protected $saveFolder = ' datas/';Public function __construct
In a project, when we build a data form, two representations are associated, and the data in one table is completely dependent on the data of another table,
FOREIGN KEY constraint syntax
[CONSTRAINT [Symbol]] FOREIGN KEY[Index_name]
Summary of several common MySQL backup methods:
Direct copy of database files
First, the data in memory is flushed to disk, while the data table is locked to ensure that no new data is written in the copy process:
Mysql>flush TABLES with READ
Mysqlnd_ms is a MYSQLND plug-in, which realizes the function of saving and switching, load balancing, and read and write separation. To use the Mysqlnd_ms read-write detach feature, you must use –WITH-MYSQLND when you install PHP. MYSQLND
Cause: It's too slow to make count (*) statistics on the InnoDB table, so find a way to see if it's going to be faster.
Phenomenon: First look at a few test cases, as follows
First, the test on the Sbtest table
Show CREATE TABLE Sbtest\g1. Row ***
This article mainly discusses how to implement the random query of MySQL, multiple table random query. The implementation method of randomly fetching a record in MySQL.Our usual query is that there is no where or where fields>2, so that only one or
The connection parameter connects to a server and must specify the connection parameters, such as user name, host name, password, port number, socket. The MySQL utilities provides three ways to provide these parameters, all of which need to be
This error occurs if you want to connect to your MySQL:
ERROR 1130:host ' 192.168.33.60 ' isn't allowed to connect to this MySQL server
Workaround:
1. Change Table method. Your account may not be allowed to log in remotely, only in localhost.
1, select the most applicable field properties MySQL can support a large amount of data access, but generally speaking, the smaller the table in the database, the faster the query executed on it. Therefore, in order to achieve better performance
The importance of Web site backup, believe that every webmaster is know, and now most stationmaster, have used the VPS host, in the Linux operating system, the VPS data backup main is, the website file, the database, the domain name configuration
Method One
Specific codeBackup
The code is as follows
Copy Code
@echo Off & setlocal enableextensions ::----------Configuration Items---------- :: Backup placement path, plusSet Backup_path=d:backup :: Database name to
Chkconfig
Chkconfig is used frequently on command line operations. It makes it easy to set up and query system services at different run levels. This can be well mastered, with proficiency, you can easily manage your startup service.
Note: Keep in
Causes of MySQL garbled charactersTo understand why garbled characters occur, we must first understand the process of initiating a request from the client, storing data in MySQL, and then retrieving the client from the table next time, which links
When there is more and more data in the database, how important is data backup. Next we will use shell scripts + crontab scheduled tasks to back up MySQL data (supporting multiple databases ), I will not explain the usage of shell and crontab too
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