Main configuration:Install MySQLModify MY.CNF, add server-id=130 and Log_bin=aminglinux1After modifying the configuration file, start or restart the Mysqld service/etc/init.d/mysqld restartTo back up the catalog's libraryBackup and restore MySQL
Provincial City Questions#省份表select * from Province;+----+----------+| ID | Province |+----+----------+| 1 | Guangdong || 2 | Hunan || 3 | Hubei |+----+----------+3 Rows in SetMysql> #城市表SELECT * from city;+----+------+------------+| ID | City |
First, the use of the sceneThe merge table is somewhat similar to a view. Using the merge storage engine to implement MySQL sub-table, this method is more suitable for those who did not consider the table in advance, with the increase in data, there
MySQL binlog recover data, sometimes may accidentally delete the data, suddenly catch urgent, how to do? Binlog to recover (if you open the Binlog), how to open it?In the my.cnf file, add the following[Mysqld]Log_bin = Mysql_binRestart the service
Today's computer reload system, all the software is re-installed, MYSQLDB module has been installed bad, tangled for a long time, finally solved, methods to share to everyone. MYSQLDB Module Installation:1, download Mysql-pyhon module, the website
Centos7 installing MySQLThis article installs the MySQL through the Yum method1. Add MySQL Yum repository
Go to MySQL Developer Center (http://dev.mysql.com/downloads/repo/yum/) to download the corresponding platform package.
Install
Number of connections to MySQL1. View the current number of MySQL connections[[email protected] ~]# mysqladmin-Uroot-p123456 statusuptime:34070Threads:1Questions:8678Slow Queries:0Opens:910Flush tables: + OpenTables4Queries per
First, the development steps of JDBC
1. Prepare four parameters
2. Registered Driver
3. Get the connection
4. Get the statement performer
5. Execute SQL statements
6. Processing results
7. Releasing Resources
1.
1. Overview of the installationThere are many ways to install MySQL, you can directly install Yum, you can install the binary installation of the source and so on. Yum installation is not recommended here, as it is not available for custom
I use the operating system when the Ubuntu16.04, the operation is implemented on the command line:Start MySQL service: sudo service MySQL startLog in as root: Mysql-u root-pDisplay database: show databases;Connection database: Use database
The Group_concat function returns a string result that is composed of concatenated values in the grouping, often used with group by.If you need a custom delimiter, you can use SEPARATOR.Example:SELECT group_concat (ID) IDs from sys_oem_resources
MySQL architecture from small to large evolution processFirst StageThe website visits the amount of PV magnitude below 1w. A single machine runs the web and DB without the need for architecture-level tuning. At this point, the data is often cold
MySQL master-slave introduction MySQL master-slave is also calledReplication, AB replication。 Simply speaking is a and b two machines from the back, write the data on a, the other B will follow the writing data, both data real-time synchronization
MySQL common command, record down, keep the spareGet table structuredesctablecolumnsfromtable;Change table namerenametableto 新表名;Delete a field from a tableALTER TABLE name Drop Col_name[,col_name .......]altertabledrop weight;Add fields to the
MySQL Master-Slave introductionMySQL master-slave is also called AB responsible, that is, A and b two machines from the back, in a some of the data, the other B can follow some data, both data synchronization;MySQL master-slave is based on Binlog,
MySQL ClientThe MySQL client is a very useful SQL shell that can manage almost every aspect of MySQL: Create, modify, and delete tables and databases, create and manage users, browse and modify server configurations, and query table data.Connect to
The so-called cascade replication is the master server, only to one slave server synchronization data, and then slave server in the back end of all slave server synchronization data, reduce the master server write pressure, and replication data
First, check the passwordThen you need to go into the/etc/mysql directory, execute sudo vi debian.cnf or sudo vimdebian.cnf to view the username and password inside,Then use the user name and password in this file to enter MySQL,If the user name in
ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repositoryMySQL 5.6 fix from library copy times wrongmysql> start slave;ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repositoryCause
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