Instance One
The code is as follows
Copy Code
PNR code connection in China$hostname = "127.0.0.1"; The IP address of the MSSQL server or the name of the server$dbuser = "sa"; The account number of the MSSQL
SET sql_mode= "No_auto_value_on_zero"; ----Database Tutorial: ' MySQL tutorial new '-- -- -------------------------------------------------------- ----The structure of the table ' test '-- CREATE TABLE IF not EXISTS ' test ' (' ID ' int (a) not NULL
Know that the 1 in tinyint (1) is only for the specified display length and does not represent the storage length, but it is useful to specify Zerofill for the field.
For example tinyint (3), if the actual value is 8, if the column specifies
In the master from replication, the following error message appears when inserting data:
The code is as follows
Copy Code
mysql> INSERT INTO test values (", ' lzh ');ERROR 1598 (HY000): Binary logging not possible.
300M free space support Php/cgi/mysql
Xlixs free space Address: http://www.xlixs.com/hosting/
Xlixs free PHP Space capacity size is: 300M;
Monthly flow limit of: 5000M;
Support Ftp/web way to upload and manage documents;
Free space Support
The length () function can get the lengths of a string:
Select Length (' ABCDEFG '), Length (' 0123456789 ');/*+-------------------+----------------------+| Length (' ABCDEFG ') | Length (' 0123456789 ') |+-------------------+----------------------+
To create a database:
Everything in MySQL starts with a database, which we can understand as "bookshelves", which can be understood as "books on the shelves", and the data in the table can be understood as "the contents of the book". This means
Tips:
Timeout error occurred trying to start MySQL Daemon.Starting MySQL: [FAILED]
Checked MySQL log (cat/var/log/mysqld.log) found prompt for an error ([ERROR] Fatal Error:can ' t open and Lock privilege tables:table ' Mysql.host ' doesn ' t
Creating triggers
Create a trigger with only one execution statementCREATE TRIGGER Trigger Name before| After Trigger eventOn table name for each ROW executes the statement where the trigger name parameter refers to the name of the trigger to be
#mysqldump database name > Database backup Name#mysqldump-A-u user name-p password database name > database backup Name#mysqldump-D-A--add-drop-table-uroot-p >xxx.sql
Export the entire database
The code is as follows
Copy Code
Description
Operating system: CentOS 5.x 64-bit
MySQL database version: mysql-5.5.35
MySQL master server: 192.168.21.128
MySQL from server: 192.168.21.129
Prepare the article:
Description: On the two MySQL server 192.168.21.128 and 192.168.21.1
MySQL default data file storage directory for/var/lib/mysql
The following steps are required if you want to move the directory to/home/mysqldata:
1, the home directory to establish Mysqldata directory
The code is as follows
Copy
Starting from this section, we will learn how to apply Smarty to the actual example. for demonstration purposes, I will use a previously written website as an instance. first, let me explain that my art skills are not very strong, so the pages I
First, we need to log on to the php Tutorial (as the mainstream development language) MyAdmin without demonstration.2. Create a database tutorial, as shown in the following figure. Fill in the database name in the right window of "MyAdmin" in php
The code is as follows:Copy code Easy to understand. The ID of the cookie-saved shopping cart and the data of the db-saved shopping cart.// Code for generating the shopping cart sessionIf (! $ Session &&! $ Scid ){/*Session is used to
Use your own domain name or sub-same cool.freehostingnow.com10 GB disk space10 GB bandwidthPHP with mysql databaseThree databasesControl panelFTP accessAdvertisement on the website!Application address: http://www.freehostingnow.comDisk Storage 100
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