4. User Module Design
For the underlying database, call MySQL's c API function to modify the database and save it internally.
Certain status variables (for example, user name, or left to the previous layer for completion ?), The upper layer provides
Combine PHP and MySQL reasonably and effectively to create a sophisticated database website. MySQL is a small, tight data server that supports standard SQL. It can be used in both UNIX and Windows environments.
PHP and MySQL are free open source
How to synchronize Mysql Data
Assume that there are host a and host B (Linux system). The IP address of host a is 1.2.3.4 (of course, it can also be dynamic), and the IP address of host B is 5.6.7.8. Both hosts are installed with PHP + MySQL. Now
Do you think this website is worth 2 million RMB? There are 1000 bullet cells on it. One bullet cell only sells for 50 yuan, but it can sell for 2 million yuan in total. Why? It's called yixiao bullet box, www.1ktag.com. Let's take a look!
The first
SQL in MySQL
For MySQL, the first thing you must remember is that every line of its command is ended with a semicolon (;), ...... There is no such thing as absolute. The same is true here.
As I mentioned earlier, when a MySQL row is inserted
Notes for operating MySQL Databases in PHP
1. semicolon exceptions
For MySQL, the first thing you must remember is that every line of its command is ended with a semicolon (;), ...... There is no such thing as absolute. The same is true here.
Set Database
The difference between the text or integer fields used in the database and the fields used to save images is that the data volume to be saved is different. The MySQL database uses special fields to store large data volumes. The data
3. Database Design
The key is the efficiency of MySQL. Allocate the MySQL memory reasonably, especially the table Cache
Size. What happens when the system suddenly loses power? Is MySQL robust?
Table name design, with a prefix indicating the type,
Show databases;Show tables from db_name;
Show columns from table_name from db_name;Show index from talbe_name [from db_name];Show status;Show variables;Show [full] processlist;Show table status [from db_name];Show grants for user;
In addition to
Today I found this conclusion wrong. However, for ease of understanding, I still do not recommend that you confuse the constraints with those outside when you are not familiar with SQL statements. In terms of readability, it can be assumed that it
1. You can set collation for a table or row to binary or case sensitive. In MySQL, the naming conventions for Column Collate are as follows:* _ Bin: binary case sensitive collation, that is, case sensitive.* _ Cs: case sensitive collation, case
1. Stop the running MySQL processIn Linux, run killall-TERM mysqldIn Windows, if it is written as a service, you can run: net stop mysql. If it is not loaded as a service, you can directly close it in the Process Manager.2. Start MySQL in Safe
1. Download the MYSQL source code version from the MYSQL official website [must be the source code version]2. Press the following code to type the LINUX Command LineCopy codeThe Code is as follows:[Note] adding mysql groups and users# Groupadd mysql#
1. MySQL Common commandsCreate database name; create a databaseUse databasename; select databaseDrop database name directly deletes the database, no reminderShow tables; displays tablesDescribe tablename; Detailed description of the tableAdd
Put the script in/home/user/mysql_backup.shCrontab# Crontab-l# M h dom mon dow command28 16 ***/home/user/mysql_backup.shThe script is as follows:Copy codeThe Code is as follows:#! /Bin/sh# Mysql_backup.sh: backup mysql databases and keep newest 5
Myisam_max _ [extra] _ sort_file_size is large enoughDelay_key_write reduces io and improves Write PerformanceBulk_insert_buffer_sizeSet concurrent_insert to 2.Read_rnd_buffer_size random scanRead_buffer_size sequential table ScanThree key cache
In MySQL, The auto_increment type id field is used as the primary key of the table and as the foreign key of other tables to form a "master-slave table structure". This is a common usage in database design. However, when an id is generated, the
Select * from tablenameSQL> select * from employees;Select select list from tablenameSQL> select employee_id, first_name from employees;Select distinct... From tablenameSQL> select distinct manager_id from employees;| Use of connectors, addition,
1. Create a data table --- BASICS (skipped by experts) Orthodox method: create [TEMPORARY] table name [if not exists](Column item definition created)[Table options][Partition options]; # The Orthodox creation method. For specific parameters, refer
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