Knowledge induction
Because MySQL is using user and host two fields to determine the identity of users, this brings a problem, is a client exactly which host. If a client matches several host at the same time, the user's determination is ranked
Set up MySQL listener extranet IP
Copy Code code as follows:
sudo vi/etc/my.cnf
Bind-address = 127.0.0.1
Setting the MySQL character set charset
Copy Code code as follows:
sudo vi/etc/my.cnf
Add a line under
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,
Also called the Master from replication, is done through binary log files, note: MySQL database version, two database versions to the same
System environment:
Master server Master ip:192.168.0.88
Slave ip:192.168.0.99 from server
One-way sync
Note
Mind Mapping
Click on the picture to view the larger image.
Introduced
Situation: If your table structure is poorly designed or your index is poorly designed, then you should optimize your table structure and give the appropriate index
Mytop is similar to the Linux top tool, which enables real-time monitoring of performance information for MySQL servers.
Installation method
1. Installation dependence
Copy Code code as follows:
# CPAN
# cpan > Install DBI
#
Set first: Set GLOBAL log_bin_trust_function_creators = 1;
1. Function Func_splitstringtotal: Split the string in the specified way and calculate the total number of cells
Copy Code code as follows:
DELIMITER $$
CREATE FUNCTION
For example: Select (A+b) as C from table
Types are also varchar type, but they are not displayed correctly.
Until Concat ()
concat function in MySQL
The following is an example of how to use the Concat function in MySQL, such as select Concat ('
How do you sort MySQL query results? This is a lot of people have mentioned the problem, the following teach you how to the MySQL query results by a certain value, if you are interested, may wish to see.
Before there is a feature modification that
Because the temporary hand itch updated the driver, the result caused the wireless card problem. However, even if the download from the official web drive a variety of toss is not done, the heart is particularly blocked. Helpless only to reload the
I. Overview
This chapter mainly writes how to generate a new slow query file online when the slow query file is very large.
Test environment: MySQL 5.6.21
Second, the steps
Configure a slow query
The default my.cnf file is in the/etc/directory
The MySQL caching mechanism is simply caching SQL text and query results, and if you run the same SQL, the server takes the results directly from the cache without having to parse and execute the SQL. If the table changes, all buffered queries that
Query current data for this week
SELECT name,submittime from Enterprise WHERE yearweek (Date_format (submittime, '%y-%m-%d ')) = Yearweek (now ());
query last week's dataSELECT name,submittime from Enterprise WHERE yearweek (Date_format
MySQL database from needless to say, now a lot of application development applications and webmasters are often used to, JDBC may generally be more unfamiliar, what does JDBC mean? Also mentioned here, the most important thing is to introduce to you,
Operation of the database will inevitably because of "careless" and wrong operation, need to restore the words through backup to restore is unlikely, because the need to restore and binlog poor to recover, can not wait, very time-consuming. Here is
In MySQL, a table with the InnoDB engine type supports foreign key constraints.Use conditions for foreign keys:1. Two tables must be INNODB tables, MyISAM table temporarily does not support foreign keys (it is said that future versions may be
>>>database
1. Modify protected/config/main.php
Remove the annotations to the MySQL database connection and modify the username, password, and connected database.
2. New protected/tests/unit/dbtest.php
The contents are as follows:
This example describes a simple voting system implemented by Php+mysql. Share to everyone for your reference, specific as follows:
Mobile phone system questionnaire What is the system you are using now?
Android Symbian Symbian
Directory
Mysqladmin command
UPDATE User Statement
SET PASSWORD Statement
Root password loss (pending verification)
mysqladmin Command
(Huitian record)
The format is as follows (where user is username and password is a new
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