The article mainly describes the actual application of MySQL rounding, as well as in its actual operation worthy of our attention and the actual application of the code description, the following is the main content of the article described in
1, optimize the data type
There are many types of data in MySQL, if you are a DBA, you are rigorously checking the data types according to the principles of optimization, but developers may choose the easiest option they think to speed up coding,
Because log files are important references for recovering database data, the maintenance of log files is also of great significance. When MySQL is used with log files, you sometimes want to delete/back up old log files and tell MySQL to start
MySQL IsNull usage explanation
MySQL can use the ISNULL () function. But it works a little differently from Microsoft's ISNULL () function.
Let's look at a few is null SQL usage first:
SELECT * from newtable where name is null//Get all data with
If the MySQL server has binary logging enabled, you can use the Mysqlbinlog tool to recover data starting at a specified point in time (for example, from your last backup) until now or another specified point in time. "Mysqlbinlog: Utility for
MySQL database export and import process will occur many unpredictable errors, this article has sorted out some common errors and corresponding solutions, encounter similar situation friends can refer to, I hope to help you
mysql command line
First of all, the MySQL service to stop, change the MySQL configuration file My.ini in the database storage master path, the old database storage main path of the database files and folders to the new storage master path, and then restart the
This article describes the use of inner join to query/delete/modify, the specific implementation of the following, learning MySQL friends can also learn, I hope to help you
copy the code is as follows:
--Query
SELECT tp.tp_id, TP.TPMC, Tp.leveid,
If you're running a Web application that uses MySQL, it's a great opportunity to keep passwords or other sensitive information in your application. Protecting this data from hackers or prying eyes is an important concern because you cannot allow
These days based on Heritrix wrote a crawler, used to MySQL, in the import of exported data, encountered some garbled problems, and finally solved, record, for viewing.
First, export the data.
First explain your environment: Mac OS X 10.8.3, MySQL
The reason is roughly that the primary key must be unique, that is, where the database may exist and where the restored database is duplicated, a restriction that Foreign keys should is uniquely named throughout the DB, an effective way is to clear
If you need to include a column in the column that the query statement returns that represents the line number in the entire result set, the ISO sql:2003 Standard proposes a method that provides the row_number ()/RANK () function. Standard methods
Workaround: 1. Change Table method. may be your account is not allowed to log on remotely, only in localhost. This time as long as the computer in localhost, login mysql, change the "MySQL" Database in the "User" table in the "host" item, from
One, the data backup shortcut
Since this method has not been validated by official documents, we are tentatively called experiments.
Objective: To back up a MySQL database backup testa in the Hosta host and restore it to the HOSTB machine
Test
A like statement in a SELECT query executes this query, although it works, but for full-text lookups this is an extremely inefficient approach, especially when dealing with large amounts of data.
Developers simply mark out fields that require
Parsing: A method for establishing a foreign key in MySQL
Example:
1. Main Table
DROP TABLE IF EXISTS ' Biao ';
CREATE TABLE ' Biao ' (
ID ' int (one) not NULL auto_increment,
Title ' varchar (one) default NULL,
Content ' varchar (one)
PHP in connection with the MySQL database when we can use a temporary connection, of course, we can also use permanent connection, the use of permanent connection because of the cost of a connection, so the time is greatly reduced, but we only use a
mysql| Program | data | Database to mention the MySQL database, as if to say java,jsp or PHP, in fact, in all programs can use the MySQL database, other programs using my SQL database method is to use my SQL provided ODBC driver, in. Net You can use
Example:-------------------------------------------------A table ID name B table ID job parent_id1 Sheets 3 1 23 12 Lee 42 34 23 Wang Wu 3 34 4Relationship between a.ID and parent_id--------------------------------------------------1) Internal
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