MySQL study NOTE 4: integrity constraints Field

Integrity constraints are imposed on fields to meet the expected results of the field. For example, a field contains a default value and cannot be null. Directly speaking, if the inserted data does not meet the restrictions, the database management

How to solve MySQL reinstallation failure

I believe that you have had reinstallation experience when using MySQL. If you reinstall MySQL, it is basically the last step. Unless you reinstall the operating system, the reason is that the registry in the system is not deleted. The following is

MySQL study Note 5: alter table)

When creating a table, we will inevitably consider the disadvantages of weeks. Therefore, we need to use the alter table statement to modify the table later. Modify Table Name Copy codeThe Code is as follows: mysql> alter table student rename

MySQL Study Notes 2: Basic Database Operations (create, delete, and view)

MySQL we have installed is a database management tool. What is really valuable is that data in a relational database exists in the form of tables, the aggregation of N tables becomes a database. Now let's take a look at the basic operations of the

How to solve the problem that mySQL occupies more than MB of virtual memory

In order to install the mysql environment for testing, it was found that mysql occupied a large amount of virtual memory after the installation, which could reach more than 8 hundred megabytes. I searched for it online and got some tips from my. ini.

Mysql supports delete multiple table records across tables

A few days ago, I wrote a summary of Mysql cross-Table update. Today, let's take a look at cross-Table deletion. After Mysql4.0, mysql began to support cross-Table delete. Mysql can delete multiple table records in an SQL statement at the same time,

Solution to 1044/1045 error when installing Navicat in Mysql

In Navicat for MySQL, PostgreSQL and Oracle The error occurs because the mysql account does not have sufficient permissions to connect to the remote mysql server. After mysql is installed, only "localhost" connections are allowed by default.

MySQL timer enabling and calling implementation code

Create test table Copy codeThe Code is as follows: create table t ( V VARCHAR (100) NOT NULL ) Engine innodb default charset = utf8; Create a stored procedure for timer calls DELIMITER $ Drop procedure if exists e_test $ Create procedure e_test

SQL code used by MySQL to query data of this week, last week, this month, and last month

Query data for the current week SELECT name, submittime FROM enterprise where yearweek (date_format (submittime, '% Y-% m-% D') = YEARWEEK (now ()); Query last week's dataSELECT name, submittime FROM enterprise where yearweek (date_format

Mysql automatically disconnects the connection solution after the idle time of MySQL connection exceeds 8 hours

There are three solutions to this problem: 1. Increase the value of the wait_timeout attribute of MySQL. Modify the/etc/mysql/my. cnf file and set it in [mysqld: # Set a connection to wait 8 hours in idle status.Wait_timeout = 86400Related

Comparison of PHP and MYSQL date

MYSQL date comparison TO_DAYS (NOW ()-TO_DAYS (date_col) Our date_col must be in the date and time format, not the timestamp, Mysql> SELECT FROM_UNIXTIME (875996580 );-> '2017-10-04 22:23:00' Day (FROM_UNIXTIME (1277709862) returns the number

Mysql xtrabackup Backup recovery implementation sharing

Introduction Xtrabackup is a mysql database backup tool provided by percona. According to the official introduction, Xtrabackup is the only open-source tool in the world that can perform hot backup for innodb and xtradb databases. Features: (1) The

Differences between IFNULL, IF, and CASE in mysql

Assume that the Status field of a data table is of the varchar type and has the following values: NULL, pending, pending refund, refund, and cancel. We know the order whose query status is cancel. The SQL statement can be written as follows: SELECT

Mysql table maintenance and transformation code sharing

Change the Data Type of a column [SQL] Alter table visitor MODIFY nam VARCHAR (30 ); Append a new column [SQL] Alter table visitor ADD age INT; Alter table visitor ADD age int first; Alter table visitor ADD age int after nam; Change column

Mysql database connection pool configuration tutorial

Step 1: Write javabean Copy codeThe Code is as follows: package withouttears. jdbc. db; Import java. util. HashMap; Import java. SQL .*; // JNDI has two core interfaces: Context and DirContext, // Context contains basic name operations, while

How to solve duplicate mysql replication Filtering

1Replicate_do_db and replicate_ignore_db do not appear at the same time. It is prone to confusion. It is meaningless. Replicate_Do_DB: db1 Replicate_Ignore_DB: db2 Statement mode: Use the use statement Use db1; insert into tb1 values (1 ); Use db2;

Usage of mysql Stored Procedure cursor Loop

Mysql stored procedures are supported from version 5. Therefore, stored procedures are generally used. Today, I will share my understanding about the Mysql stored procedure. Some simple calls and syntax rules are not described here. There are many

How to import csv data files in MySQL

If you back up your data, ignore it.If the data is too big, use the database client software to directly import the data into the memory, or execute SQL directly.1. Specify the file path.2. fields are separated by commas, and data rows are separated

How to sort mysql by Chinese

SQL code Copy codeThe Code is as follows :/* Navicat MySQL Data Transfer Source Server: localSource Server Version: 50022Source Host: localhost: 3306Source Database: test Target Server Type: MYSQLTarget Server versions: 50022File Encoding:

Mysql error 1130 hy000: Host "localhost" solution

ERROR 1130 (HY000): Host 'localhost' is not allowed to connect to this MySQL server www.2cto.com Cause:Mysql only has one root user. After changing the root password, select MD5. After submission, click"Host 'localhost' is not allowed to connect

Total Pages: 3233 1 .... 2147 2148 2149 2150 2151 .... 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.