MySQL reference manual-8. MySQL tutorial-8.3 examples of common queries
This article from: http://linuxdb.yeah.net Translator: Yan Zi
(18:22:34)
8.3 examples of common
Here is an example of using the date function. The following query Selects all records. The value of date_col is within the last 30 days:
Mysql> select something from tableWhere to_days (now ()-to_days (date_col)
Dayofweek (date)Returns the
1. install Apache
A) double-click the file Apach_2.2.8_win32-x86-no_ssl.msi to bring up the welcome interface. Click the next button to go to the license agreement interface.
B) The user must agree to the terms in the interface to continue the
Since MySQL supports Unicode, to keep pace with the times, our webProgramWe also started to consider using utf8. In fact, utf8 has been used for several years, and the program can basically run, there is no big problem, but when data is swapped, it
The Python version of centos5.3 is really tearful. When is it 2.4. Self-help clothes and food.
1. download version 2.7 from the official website
# Wget http://www.python.org/ftp/python/2.7.1/Python-2.7.1.tar.bz2
2. Installation
# Tar-jxvf Python-
MySQL has a lot of basic commands, and the show command is also one of them. In many users, the use of the show command is also prone to confusion. This article summarizes the many usage of the show command.1. Show tables or show tables from
Mysql is used in the recording project. During the test today, we found that the mysql database cannot be remotely connected. It turns out that mysql does not allow remote connection by default.
After searching, we found a solution and recorded it
Mysql backup policies can be divided into four types:
1) directly copy database files (not recommended)
2) use mysqlhotcopy to back up the database
3) Use mysqldump to back up the database
4) use the master-slave replication mechanism (for real-time
Apache Http://httpd.apache.org/
Apache HTTP Server (httpd) 2.2.17 is downloaded. Click download and select
Httpd-2.2.17-win32-x86-openssl-0.9.8o.msi
Of course, you can also download the source code httpd-2.2.17-win32-src.zip, but you need to compile
Install
PureFTPdIn the past, we had to make the following preparations:
1. Install FreeBSD4.9.
2. Customize the kernel and add "options QUOTA" to the kernel to support user quotas. (Note: how to implement other * nix systems? Please search for them
Currently, you can set options to operate the connection timeout of two client extension libraries, such as mysqli:
Copy codeThe Code is as follows: // Create an object
$ Mysqli = mysqli_init ();
// Set the timeout Option
$ Mysqli-> options
Recently, the CPU usage of MYSQL service process (mysqld-nt.exe) on a friend host (Windows 2003 + IIS + PHP + MySQL) is 100% high. This host has about 10 databases, which are called for 10 Websites respectively. According to A Friend test, lead to
Let's first review the basic knowledge of field selectivity.
-- Basic knowledge of field selectivity --
Introduction: Can I create indexes for all fields?
As shown in the following table, the sort field has very poor selectivity. You can run the
Problem:
After installing the new 5.1 mysql odbc Driver, the program prompts "(MySQL ODBC 5.1 Driver). The specified Driver cannot be loaded ."
Solution:
The security settings of windows2003 are very important. Therefore, many people set the
Xtrabackup------ Necessary tools for MySQL DBA
Note:
1) Documents Reference http://www.percona.com/docs/wiki/percona-xtrabackup:start
2) mysql version 5.1.50 or later.
1. Introduction and installation of Xtrabackup
1. Xtrabackup is an open-source
If you want to import Chinese data, the utf8 Character Set set in mysql will save the UTF-8 character set for the xxx.txt file you want to import. The command load data infile "d: /Websites/Sxxxx/test1.txt "ignore into table 'names' fields
The explanation of mysql explain is clear.Of
With the help of explain, you will know when to add an index to the table to use the index to search for records so that select can run faster.If the index is not properly used, you can run analyze table
Because the utf8 character set is currently the most suitable character set for conversion between different character sets, although you may not be able to correctly view the content in the database on the command line tool, I still strongly
The column types supported by MySQL are listed below. The following code is used to describe:MSpecifies the maximum display size. The max valid display size is 255.DApplicable to the floating point type and the number of digits following the decimal
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