For security reasons, the database needs to be backed up frequently, or restored. For MySQL, the most convenient way may be to use the phpMyAdmin export, import functionality, but if your database volume is larger, as a WEB application phpMyAdmin
A. MySQL does not support Chinese by default, and its server and DB defaults to latin1 encoding. So we're going to change it to Utf-8 code, because utf-8 contains the binary encoding of most languages on the planet.
1. Turn off MySQL service
MySQL slow query log is useful for tracking problematic queries, can be analyzed in the current program has a very resource-intensive SQL statement, that how to open MySQL slow query log records it?
In fact, open MySQL slow query log is simple,
First, install MySQL:for MySQL in the entire process is relatively independent installation, and my Ubuntu in the previous development has been installed MySQL, so the following is only the installation steps:1, the installation of MySQL services:
Creating data TablesThe following information is required to create a MySQL datasheet:
Table name
table field Name
Define each table field
Grammar
The following is the SQL general syntax for creating a MySQL datasheet:
First of all, some uses of MySQL's distinct keywords:
1. This can be used when count does not duplicate records, such as SELECT COUNT (DISTINCT ID) from tablename , or how many records with different IDs in the Talbebname table are counted.
2, you
MySQL from 5.0 to support the stored procedures and trigger, we like to use MySQL friends more like the reason for MySQL, grammatical and pl/sql differences, but have been programmed to know that the grammar is not a problem, the key is the idea,
the use of having
The HAVING clause allows us to sift through the various data in the group, where the words filter the records before aggregation, that is, before the group by and the having words. The HAVING clause filters the group records after
Recently, I worked with a bunch of old clients and they let them take the time to tell them about the new tools they used in their new environment. One of the very useful tools that I found was schemaspy.
Schemaspy is a Java-developed tool
As we all know, in MySQL, if direct order by RAND (), the efficiency is very poor, because it will be executed multiple times. In fact, if the equivalent query is also in RAND (), let's take a look at the different execution plans and execution time
You have a error in your SQL syntax; Check the manual that corresponds to your MySQL server Versio This sentence is not unfamiliar to us, nothing more than "," and so on. But if you accidentally added a reserved field in MySQL as the name of the
Brief introduction
I know there are a lot of articles and guidelines for implementing master-from replication on the Internet. In master-from replication, the host affects the machine. But any changes from the database will not affect the primary
Typically, for a new MySQL server, there is no data for us to test and use. In this respect, MySQL provides us with a number of sample databases, we can base on these databases for basic operations and stress testing and so on. This article
Because the database server has a lot of databases and small databases, it was originally run on a Windows server. Some time ago due to the computer room server to make adjustments, so I will be in a night of nights on the migration of the database
1. Preparatory work
Download MySQL's latest installation-free version mysql-noinstall-5.1.53-win32.zip, extract to related directories, such as: d:\\ Mysql-noinstall-5.1.53-win32. This is the root directory of MySQL.
2. Configure
There are
Reference:
Http://stackoverflow.com/questions/412341/how-should-i-store-guid-in-mysql-tables
Typically, a UUID is used as a unique identifier and needs to be stored in the database.
Format of UUID
Copy Code code as follows:
String
This tool class is simple to use, instantiate direct call on it, we can also easily according to their own needs in the inside to add their own functions
Copy Code code as follows:
Package com.lanp.ajax.db;
Import
Today I would like to introduce you to the actual application, how to load the data into the map. This article unifies the example, uses Php+mysql+jquery to realize the Chinese map each province data statistic effect.
This example is to count the
There was a problem using the mysqldump command to back up data today.The first migration Discuz 7 forum MySQL database, the use of mysqldump command when everything goes well, but the introduction of the time encounteredError 1062 (xxxxx) at line 12
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