Recently due to project requirements, to implement the Excel file through the PHP page into the MySQL database. Search on the Internet a lot of this information, found that the Excel file is saved as a CSV file, and then imported from the CSV file.
A small number of databases we can make a full backup every day because it won't take much time, but when the database is large, we are less likely to make a full backup every day and change it to a weekly full backup, an incremental backup like
First, preparatory work
First of all have to prepare the hardware facilities, I here are 3 machines in the cluster, the structure is as follows:
Management node (MGM) 172.16.0.162 (DB1)
SQL Node 1 (SQL1) 172.16.0.161 (DB2)
SQL Node 2 (SQL2) 172.1
Using rsync to configure a large number of MySQL, save a lot of compilation and configuration time, with the master and slave server to modify the MY.CNF, after the discovery of data can not be synchronized
Using rsync to configure a large number of
1005: Failed to create table
1006: Failed to create database
1007: Database already exists, failed to create database
1008: Database does not exist, delete database failed
1009: Unable to delete database file causes database failure to be
MySQL uses the WKB function to create geometry (geometric) values
MySQL provides a number of functions that include a blob containing a wkt expression, or an optional space Reference System ID (SRID) as an input parameter. They return the
With the popularization of network, more and more web-based applications are used. The network database is one of them. Through one or several servers can provide services for many customers, this way to bring people a lot of convenience, but also
In day-to-day work, protecting data from unauthorized users is a particular concern for system administrators. If you are currently using MySQL, you can use a number of convenient features to protect the system to significantly reduce the risk of
transactions can simulate SQL operations, SQL operations when all SQL operations are successful, and all SQL operations of the current transaction are rolled back whenever an operation fails, avoiding the occurrence of the data written in the
Read the database we need to use the functions in PHP to connect to the database and then use the data in the SQL query table to iterate through it again, let's look at a simple read MySQL instance The code is as follows: linkid); Or: DEFINE ('
Post Code First
The code is as follows: Database Related $con = mysql_connect ("localhost", "root", "root"); Link Databaseif (! $con) {Die (' Connection failed! ' . Mysql_error ()); To judge whether or not to succeed}/* IF (mysql_query ("CREATE
After we have built MySQL master and slave, we usually pass commands from the library.Show Slave Status\gTo see the master-slave state, there will be a lot of parameters, the next I will take everyone to understand these parameters[email protected]
MySQL automatically transforms numbers into strings when necessary, and vice versa:Mysql> Select 1+ "1"; -2 mysql> SELECT CONCAT (2, ' test '); ' 2 test 'If you want to explicitly transform a number into a string, pass it as an argument CONCAT() .If
Before because data storage uses Excel to save all the data, after preliminary data filtering, the amount of data is nearly 4,000. A single entry into the database is obviously not feasible. Here are the steps I'm working on:1. Keep only the data
MySQL built-in functions:
Character functions
numeric functions
Time-Date function
Common use of numeric functions:1 Select avg from Tdb_goods; Find the average of field valuesBuilt-in summation functions:1 Select sum from
Recently in order to build their own development environment, once again on the centos7 to install MySQL and C + + Access environment, hereby record the construction process, convenient for later reviewOne. Install MySQLCentos7 default installation
1. How to log in to MySQL database
Mysql-u username-p
2. How to turn on/off MySQL service
Service MySQL Start/stop
3. Check the status of MySQL
Service MySQL Status
4, how to display the number of all databases
Show
Talking about MySQL temporary table and derived table, talking about mysql Derivation
About derived tables
When the primary query contains a derived table, or when the select statement contains the union clause, or when the select statement contains
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