Let's look at the code below.
The code is as follows
Copy Code
Set conn = Server.CreateObject ("Adodb.connection")Conn.Open "Driver={mysql ODBC 3.51 DRIVER}; Server=127.0.0.1;database=shops; User=root; password=xxx; "
1. Direct Reset Automatic increment value
The ALTER table syntax provides a way to reset AutoIncrement columns. Take a look at the example below.
ALTER TABLE table_name auto_increment = 1;
Note that you cannot reset the counter's value less than
1.Linux server is generally SSH protocol, if the local is also a Linux environment, you can directly through the shell Connection, command: Ssh-l root-p 8080 202.***.***.*** Where Root is the user name, generally root,8080 for the port, 202.***.***.*
A, what view View is an interface for storing data, or it can be said to be a virtual table. This data can be from one or several basic tables (or views) of data. It can also be data that the user has defined from. In fact, the view does not
PHP updates to MySQL update
The UPDATE statement is used to modify the datasheet.Updating data in a databaseThe UPDATE statement is used to update the existing record table.Grammar
UPDATE table_name
SET column1=value, column2=value2,...
WHERE
PHP's MySQL ORDER by command keyword
Command keywords are used to sort data records.The keyword for this commandCommand keywords are used to sort data records.The command keyword sort records are sorted in ascending order by default.If you want
In reality, MySQL can build a composite index based on business needs, because MySQL uses the B-tree format index, you can locate records directly without scanning. MySQL establishes the principle of the leftmost prefix for multiple-column indexes,
Business requirements
Two servers are equipped with a database, in order to prevent a server problems and affect the operation of the business, need to prepare two servers to run MySQL, and need two server data is kept synchronized. That is to say
A few common knowledge about MySQL permissions:
1, MySQL's permission system is mainly used to verify the user's operating rights.
2, within the MySQL, the authority information stored in the MySQL database granttable. When MySQL is started, the
MySQL imported through the database, when there are stored procedures, after the import of stored procedures can not use the program, for a long time to find the reason, the last discovery is the issue of permissions.
1, we want to use to view the
MySQL starting MySQL ... The server quit without updating PID file
1. May be the/usr/local/mysql/data/rekfan.pid file does not write permission
Workaround: Give permission, execute "chown-r mysql:mysql/var/data" "Chmod-r 755/usr/local/mysql/data"
Today, the MySQL stored procedures to learn, we first look at the following code:
A friend who doesn't understand grammar can look at the grammatical structure in detail.
The code is as follows
Copy Code
Create
Space size: 100M (Excess can be free to ascend)Space Flow: UnlimitedSupport Chinese: YesSupport scripts: PHP, CGI, PerlBundle Domain Name: 1 (first or two domain name can be), and the other with a *.ganpower.com sub-domain nameFTP account: AMySQL
One, mysqldump backup method
It seems to be the simplest way to back up a table in addition to the MySQL client. Record it.
Shell> mysqldump [OPTIONS] database [tables]
If no data table is specified, the contents of the entire database are
Php+mysql Why the first data cannot be displayed and how to resolve it
while ($row = @mysql_fetch_row ($result)) "Before reading the data, you have used the IF (@mysql_fetch_row ($result)) to make a judgment of the data that has no match, so that
Today new on a Linode VPS, choose Japan's Data Center! The speed is quite fast, the ping value is very low.
The direct clicks, registers the input da932e6d6e613d7e0ae2cd3bc1302581a927fb04, after using 3 months, Linode will return to me the $. Hey!
Scheduled backup of Web site data
The code is as follows
Copy Code
#!/bin/bashPath=/bin:/usr/bin:/sbin:/usr/sbin;Export PATH;Tar zcvf/web/backup/bak.$ (date +%y-%m-%d). tar.gz/web/www/www.111cn.netFind/web/backup-type
Let's first look at the query of duplicate records The code is as follows:Copy code SELECT *FROM (SELECT *FROM dede_archivesOrder by id DESC) Arc, dede_soft BWHERE arc. id = B. aidGroup by 'additional title'Order by 'id' DESCLIMIT 0, 30 It's
SQL statementSELECT *FROM (SELECT 'field', count (*) AS totalFROM 'table name'Group by 'Group field') AS tWHERE total> 10 and grouping fields <> ""This means that after the joint query, the data found by the group is processed as a condition. After
Note:An online MySQL database server suddenly loses power, causing system failure to start up. After you reinstall the system, find the previous MySQL database folder.Problem:By copying files to restore the previous MySQL database, we found that the
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