As described earlier, because you need to test the MySQL master-slave configuration scenario, install multiple MySQL. This time, install multiple MySQL 5.7.14 on Ubuntu kylin 14.10.
System environment: Ubuntu Kylin 14.10, 64-bit systemMySQL version:
My system is ubuntu6.06, recently installed good MySQL in the MySQL tool, always have the error tip:
# mysql-uroot-p
Enter Password:
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)
use the method described on
Here is a way to implement it. The idea is to find a way to interrupt the execution of the code by using an error statement in the trigger.
Mysql> CREATE TABLE T_control (ID int primary key);
Query OK, 0 rows affected (0.11 sec)
mysql> INSERT INTO T_
Copy Code code as follows:
/* Set up the data table * *
CREATE TABLE Td_base_data (ID int () NOT null Auto_increment,userid int () default ' 0 ', primary key (' ID ')) engine=myisam DEFAULT CHARSET=GBK;
CREATE TABLE td_base_data_20090527 (ID
In contrast, loading data into a database is straightforward. However, there are also strategies that can be used to improve the efficiency of data loading operations, and the rationale is as follows:
A bulk mount is faster than a single-line load
Using the method, add explain to the SELECT statement before you can:
Such as: Explain SELECT * FROM Test1
Explanation of the Explain column:
Table: Shows which table the data in this row is about
Type: This is an important column that shows what
1, the int to varchar often use the concat function, such as concat (8, ' 0 ') to get the string ' 80 '
2. Convert varchar to int using CAST (a as signed) a as varchar type string
Summary: Type conversions, like SQL Server, are somewhat different
The larger the physical memory, the larger the setting. The default is 2402, tuned to 512-1024 bestinnodb_additional_mem_pool_size=4m defaults to 2MInnodb_flush_log_at_trx_commit=1(set to 0 is to wait until the innodb_log_buffer_size queue is full
Some characters of the extended regular expression are:
“.” matches any single character.
A character class "[...]" Matches any character within the square brackets. For example, "[ABC]" matches "a", "B", or "C". To name a range of characters, use
I admit I'm not a leader in PHP. However, after looking at some PHP information, I think there are some features that need to be added to handle database connections and consolidate XML. To do this, I think I can create a class that handles the
In general, the occurrence of garbled characters have 2 kinds of reasons, the first is because the encoding (charset) set error, causing the browser to parse with the wrong encoding, resulting in a full screen messy "heavenly book", followed by the
First, you need to install the configuration on the server phpMyAdmin
Installation configuration method for details: http://www.jb51.net/article/15330.htm
After installation, came to phpMyAdmin's homepage as shown below:
Second, create a user
First, open Binlog.
First check to see if Binlog is open
Mysql> Show variables like "Log_bin";
+---------------+-------+
| variable_name | Value
+---------------+-------+
| Log_bin off
+---------------+-------+
1 row in Set (0.00 sec)
First look at the architecture, as shown in the following figure:
Deployment
1. Modify the Hosts
Perform the same operation on all servers.
Vim/etc/hosts
192.168.137.10 Master
192.168.137.20 backup
192.168.137.30 slave
192.168.137.40
Problem: Use a thigh write remote tool to manage the MySQL database, found that all the data can be displayed, but can not be deleted, modified and so on.
Thinking: You can read the information in the database remotely, indicating that the current
Save the following code as a. bat file
Copy Code code as follows:
@echo off
Echo.
echo MySQL Database backup
Echo *****************************
Echo.
Echo is%date% today.
echo Time is%time%.
Echo.
Echo *****************************
MySQL will appear in Chinese garbled because
1.server itself set the problem, generally is latin1
2. No coding format was developed for the construction of the database.
MySQL in the form of input data appear in Chinese garbled solution:
1. When
Data storage Evolution Idea one: library Tanku
A library single table is the most common database design, for example, a user table is placed in database db, and all users can find it in the user table in the DB Library.
The idea of data storage
MySQL as a database of the main force, everywhere in our various systems, I believe that everyone is not unfamiliar! But, you know you can use does not mean you know the details, then we will take stock count some of the places we usually do not pay
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