First, simple query:Basic Syntax:
The code is as follows
Copy Code
SELECT * from Tb_name;
Query all
The code is as follows
Copy Code
SELECT field1,field2 from Tb_name;
Example 1
MySQL functional function to achieve Pinyin query:Function: Enter the first letter of each word in Chinese string to retrieve the corresponding data.How to: Use Py directly (field name) = ' keywords '.
The code is as follows
One, scheduled backup MySQL database
For security purposes, execute directly with root:
The code is as follows
Copy Code
/root/mysql_backup.sh# everyday 3:00 AM Execute database backup3 0 * * */root/mysql_backup.sh
Import Error: 40101 SET @OLD_CHARACTER_SET_CLIENT =@ @CHARACTER_SET
method to enter: Mysqluse test; MySQL source c:/test.sql Import data, if the target database or table is the UTF-8 character set, and the import SQL has Chinese, may be garbled in
MySQL is crazy to eat memory, just started the memory only accounted for 700M, Half a day after 1.5G, running 2 days after the 3G memory, including FP, previously restarted MySQL down, so I set the scheduled task to automatically restart MySQL every
Under Windows Server
1. Stop MySQL service (as Administrator, run under cmd command line) Use the following command:
The code is as follows
Copy Code
net stop MySQL
2. Use the command to start the MySQL
MySQL stored procedure instanceTechnical points
A stored procedure includes a name, a list of arguments, and a set of SQL statements that can include many SQL statements. The following is the process of defining a stored procedure:
CREATE
This tutorial today is about a common problem with friends who are bothered using the MySQL Tutorial database tutorial, and the MySQL group by first sorting and grouping together using methods, see examples below.
Look sort
SELECT * FROM
Here's a list of 100 tables to illustrate the next 100 million data, see the code below.
When the volume of data surges, everyone will choose the library table hashing and so on to optimize the data read and write speed. The author made a simple
Install RVM
You typically use RVM or rbenv to install Ruby, where you choose RVM.
$ Curl-ssl Https://get.rvm.io | Bash-s Stable
Load into RVM:
$ SOURCE/HOME/LIBUCHAO/.RVM/SCRIPTS/RVM
$ rvm-v
RVM 1.25.12 (Stable) by Wayne E.
One, the child chooses the basic usage
1, the definition of the sub-selection
The sub-option allows one query to be nested within another query. For example, an examination score project divides the examination into two situations: examination (T)
The example in this article describes the PHP based on a single case pattern encapsulation MySQL class. Share to everyone for your reference, specific as follows:
Class:
;
Print_r ($arr);
echo "";
The Public Function V ($arr) {echo ;
This article describes the implementation method of Php+mysql+ajax lightweight chat room. Share to everyone for your reference, specific as follows:
Do a QQ chat dating site, want to add a chat function, so finished using PHP to do a simple and
First, preliminary preparation situation
1. An installed WIN2000 server, note: If IIS is pre-installed, please deactivate or disable the IIS service first.
2. Next software
APACHE: Version: 1.3.22--apache_1.3.22-win32-x86.msi
JDK: Version:
The examples in this article describe MySQL interception and split string function usage. Share to everyone for your reference, specific as follows:
First of all, intercept String functions:
SUBSTRING (commentid,9)
This is very
This article describes the MySQL learning Notes data definition table constraints, pagination method. Share to everyone for your reference, specific as follows:
1. Primary KEY Primary
Feature: A primary key is a constraint that uniquely identifies
The online business uses the ORM framework, and discovers a slow query SQL that has been sorted two times in the same field, resulting in filesort. The ORM Framework has its own table structure as follows:
CREATE TABLE ' Unopen ' ( ' Corp '
Under normal circumstances MySQL startup error is very easy to troubleshoot, but today we have to say that the situation is not general. Get a server, install MySQL after the boot, startup error is as follows.
Some classmates say, dude, are you a
Authorization: All permissions, can also grant partial permissions,% wildcard, representing allMysql> Grant all on discuz.* to ' rachy ' @ ' percent ' identified by ' 123456 ';Query OK, 0 rows affected (0.01 sec)Refresh permissions to make it
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