centos7-daily backup MySQL database The first step: Write a database backup script database_mysql_shell.sh#!/bin/bashdate=`Date+%y%m%d%h%M ' #every minutedatabase=springboot-Admin #database namedb_username=Root #database
The purpose of modifying rename database by Information_schema information
MySQL does not have rename database command, can only modify the table in disguise to the table in the target library to achieve:
Stitching Reanme Tables
A Getting Started statement:1. Connect to the server:Command: CD installation directory \ BinMysql-uroot-pThen enter the password(specifically: mysql-u username-p password)Remote connection to MySQL database: Mysql-ip address or URL-u user name-p
To export a database:1, Windows cmd Open command line2, CD to the bin directory of the installation directory of MySQL, if the bin directory is added to the environment variable does not need to switch to the bin directory3. Export database:
The Find_in_set function in MySQL is interesting, and its function is to find a comma-separated value, we can store the data like the 1,2,3,4 format. Today we'll look at how to correctly use the Find_in_set function for data query in thinkphp.In
To small white to see, the Big God skipped!!1.1First to the MySQL official website www.mysql.com please add link description download, must go to the official website.I am here to download the 5.7.22 version of the installation, the WIN10 system for
First, when setting the Date field of the database, you must first determine what type to use, DATETIME, TIMESTAMP, date, time, year.where datetime and time are used more, and the date type of the Pojo generated in Java is dated.Key conversion steps:
1. Create a data tablecreate table table_name( id int not null auto_increment, name char not null, age int not null, register_date date, primary key(id);)2. Inserting data (increment)insert into table_name (name,age,register_date)
1. Create a userCREATE user username @ ' IP address ' identified by ' password ';CREATE user username @ '% ' identified by ' password ';ps:% indicates that all ID addresses can connect to the database, and the IP address indicates that only this IP
--function--set the time zone.SetTime_zone= ' the';--Turn on Event SchedulerSetGLOBAL Event_scheduler= 1; DropEventif existsCommission_ms_ever_month; # set the delimiter to'$$'DELIMITER $$CreateEvent Commission_ms_ever_month onSchedule every1
Objective:One: What is an indexIndex is relative to the column that the data can be tableEach table has its own field and table data, field columns, and table data corresponds to one row of data in the tableThe index will change this field'sAll
Qps-query per secondTps-transaction per second is not a particular concern, and the transaction standards are not the same in each business scenarioⅠ, Sysbench test frameworkⅡ, common test scripts[[Email protected]_42_63_centos lua]#
Have encountered this problem a few times before, all feel that the problem is not big, so there is no record, but this time again met, and did not think of the first time, so there is a record of the necessaryMySQL DELETE statement throws when
0. Introduction MySQL as a current mainstream open source relational database, has been widely concerned by everyone. Devc++ is also an open source, simple C + + editor that has a simpler and faster compilation than vs. But there are few links to
1. Turn off MySQL service before uninstallingOff way one, if the way one does not please use the way two,[[email protected] ~]# systemctl status MySQL[[email protected] ~]# systemctl stop MySQL[[email protected] ~]# systemctl status MySQLClosing
To understand grouping, you can: group the column names followed by the GROUP BY clause, and then manipulate each grouping instead of the entire table.For example: In the Product table, retrieve the quantity of goods supplied by each supplier.Mysql>
Directory:1. Constraints 2. ALTER TABLE3. VIEW1. ConstraintsDescription: SQL constraints are used to specify the data rules in the table, and if there is a violation of the data behavior of the constraint, the behavior will be constrained to
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