1, the right to give
Description: MySQL deployed on server A, internal network Host B through the client tools to connect server A for database operations, requires server A to give Host B operation MySQL permissions
1.1 Enter MySQL on Server A,
SQL pattern matching allows you to use“_”匹配任何单个字符,而“%”匹配任意数目字符(包括零字符)。在 MySQL中,SQL的模式默认是忽略大小写的。下面给出一些例子。注意使用SQL模式时,不能使用=或!=;而应使用LIKE或NOT LIKE比较操作符。
Want to find out“b”开头的名字:
mysql> SELECT * from pet WHERE name like ' b% ';
+--------+--------+--
Taking the mysql_query () function as the basic prerequisite for the tutorial, let's take a look at the use of mysql_query ():mysql_query () functionPHP MySQL function library, the mysql_query () function is used to send and execute SQL statements
Although an order by is not exactly the same as an index, an index can be used, as long as the unused index portion and all the extra orders by fields are included in the WHERE clause.
Use the indexed MySQL order bySeveral of the following queries
Recently found in the MySQL DOS Client Output Window query table data, the table's Chinese data are displayed garbled, as shown in the following figure:
Surfing the Internet for a reason: the reason that will display garbled, because the MySQL
Today installs the OpenStack Folsom version, installs the MySQL, adds the corresponding database and the user for each service, discovers
Unable to log in to MySQL using the new user. The way I add users is as follows:
Mysql-uroot-p$mysql_pass
Directory
There are three common ways to install MySQL:
RPM Package Form
Universal binary Form
Source code Compilation
1,rpm Package Form
(1) The operating system publisher provides
(2) MySQL officially provided (version update, fixed more
Problem description: After getting code, you cannot request the micro-trust API data with Ajax. This is related to Ajax Cross-domain access to the user information to save to MySQL, found that the Chinese all become?? Garbled
By accessing the
SQL code
Copy Code code as follows:
/*
Navicat MySQL Data Transfer
Source server:local
Source Server version:50022
Source host:localhost:3306
Source Database:test
Target Server Type:mysql
Target Server version:50
MyISAM and memory using table-level locks (table-level locking)
BdB with page locks (page-leve locking) or table-level locks, default to page locks
InnoDB supports row-level locks (row-level locking) and table-level locks, which default to
When using the MySQL database, you sometimes encounter situations where MySQL functions cannot be created. Here is a solution to the MySQL function can not create problems, for your reference.
Case one:
Currently, there was an error executing the
First, the concept:① Database Synchronization (master-slave Synchronous---Primary database writes to write data from server)② database Synchronization (primary primary Sync---Two database servers write data to each other)
Second, for examplePrimary
Date_forma T (date, format) returns a string of results based on format date or date and time value date according to the format string formatting.
You can format date or datetime values in Date_format () to get the desired format. Format date
Edit the MY.CNF or My.ini file to remove the comments from the following lines of code:
Copy Code code as follows:
Log_slow_queries =/var/log/mysql/mysql-slow.log
Long_query_time = 2
Log-queries-not-using-indexes
This
But how do you find out which SQL statement is executing too long? Can be found through the MySQL slow log, detailed below.
First find MySQL configuration file my.cnf, according to different versions of MySQL open slow query configuration is not
1. View the current character set:
Copy Code code as follows:
Show CHARACTER SET;
2, delete MySQL related directory
Copy Code code as follows:
rm-rf/usr/local/mysql/* installation directory
An index is a structure created on a table that sorts the values of one or more columns in a database table.
Its main function is to improve the speed of query and reduce the performance cost of database system.
Through the index, the query data
A connection query is a condition in which two or more tables are connected by a criterion to select the data you want
When you have fields in different tables that represent the same meaning, you can connect these tables by using this field
When troubleshooting a deadlock problem for a customer, I encountered an interesting case involving a InnoDB clearance lock. I expect that the transaction should not have a lock for a WHERE clause does not match any of the rows, but I was wrong. Let'
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