Mysql date addition and subtraction

1. MySQL adds a time interval for the date: date_add () Set @ dt = now (); Select date_add (@ dt, interval 1 day);-add 1 day Select date_add (@ dt, interval 1 hour);-add 1 hour Select date_add (@ dt, interval 1 minute);-add 1 minute Select date_add (

MySql cross-database Stored Procedure Operation Note

  BEGIN DECLARE deliverstatus, smlen, datacoding, total int; DECLARE tsid, srcaddr, destaddr, servicetype, smcontent, linkid, sequenceno, recvtime, state, resulttime, extcode, applicationid varchar (50 );   Set total = 0; While total Set tsid = '';

Mysql 5.5.16 has been compiled manually.

  I. Virtual Environment preparation   Virtual Machine: VMware Workstation System: CentOS6.0 (64Bit) Basic installation   Ii. Related Components Cmake: http://www.cmake.org/ Bison http://www.gnu.org/s/bison/ Mysql: http://www.mysql.com/ M4:

Mysql can use localhost for IP connection.

  Today, I made a very low-level error: MySQL can be connected using localhost, but it cannot be connected using IP addresses.       The result is that you forgot to authorize the database. Use the grant command in the MySQL command line

MySql select from a link target to be updated

  In MySql, how to select from a link target to be updated: Problem description: In the Fifth Edition of database system Concepts ( Fifth Edition), Chapter 3 describes SQL update. An example is as follows: + ------------------------- + --------------

MySQL form size

  This refers to the size of the form, rather than the maximum length of a data storage item in the table. PS the length of the blob type in the table is given here. BLOB is a binary large object. It is a container that can store large amounts of

Improve MySQL table_cache

  The following are my broken ideas at work, and the records are messy ...... ........................................ ................................ In mysql, there is a table_cache parameter. When the value is too large, the efficiency will be

MYSQL configuration replicate error 1200

  Master server: window XP, mysql 5.5 Slave server: window7, mysql 5.1   When starting The server slave, The system always prompts error 1200: The server is not configured as slave; fix in config file or with change master.   Use it directly on the

Mysql foreign key Association

Today, I will continue reading the book "mysql database development" recommended by the instructor. I encountered a problem when I saw the foreign key association problem with the innodb database, in the book, you can modify the parent table and

Mysql primary key auto-Increment

SQL statements with auto-increment primary keys in mysql database tables1. do not control the start point of the primary keyCreate table emb_t_dictBusType(Emb_c_busTypeID int not null auto_increment,Emb_c_busTypeEnName varchar (255) not

MySql error Solution

1. Solution to mysql service failure operating system:Win xp: mysql service cannot be startedException message: mysql service cannot be started on the local computer. Error 1067: Process aborted unexpectedlyCause: the my. ini file does not exist in

Mysql horizontal table sharding

Mysql encounters horizontal table sharding when the data volume is large. 1. Split tables based on business attributes This table sharding algorithm is roughly modulo, hash, md5, and so on. If you want to split a table using a business attribute and

Regular MySQL Database Backup Using shell scripts

PhpData backup is required for any online e-commerce site. Regardless of version updates or server migration, the importance of backup data is self-evident. Manual data backup not only consumes a lot of time and effort, but is not very professional.

Solution to remote connection failure of mysql

The remote connection to mysql fails. The error "1130-host... is not allowed to connect to this MySql server" is displayed.Authorization method. For example, if you want myuser to use mypassword to connect to the mysql server from any host. Grant

Usage of bigint, int, smallint, and tinyint storage in mysql

Use the exact numeric data type of integer data. Bigint integer data from-2 ^ 63 (-9223372036854775808) to 2 ^ 63-1 (9223372036854775807) (All numbers ). The storage size is 8 bytes. Int integer data from-2 ^ 31 (-2,147,483,648) to 2 ^ 31-1 (2,147,48

Add and delete InnoDB data and log files

-- From mysql official documentation add and delete InnoDB data and log filesThis section describes what you can do when InnoDB tablespace consumes space or when you want to change the log file size. The simplest way to increase the InnoDB

MySQL login configuration

Grant all privileges on *. * TO root @ "%" identified by 'abc'; mysql> select user, host, password from mysql. user; + ------ + ----------- + ------------------ + | user | host | password | + ------ + ----------- + ------------------ + | root |

How to export data from MySQL to excel

It is very easy for MySQL to export data to an excel file. Execute a command like this: select * from a table into outfile 'd:/file name .xls; the preceding command is executed on the server, it is exported to server D: disk. If it is executed in

Explain the differences between "InnoDB" and "MyISAM"

InnoDB and MyISAM are the two most common table types used by many people when using MySQL. The two table types have their own advantages and disadvantages, depending on the specific application. The basic difference is that the MyISAM type does not

SELECT into outfile backup database data

SELECT into outfile backup database data select email into outfile "test.txt" from email; select substring (boss,), addr from guest; load data [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE "/opt/abc.txt" into table table_name -www.2cto.com-fields

Total Pages: 3233 1 .... 2819 2820 2821 2822 2823 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.