MySQL initialization steps

The beginner in the MySQL initialization step must be familiar with the problem that PHP cannot connect to the database just now when using MySQL. Now, let's take a look at the work to be done, on the premise that you have added the mysql working

MySql date subtraction returns the number of months

MySql date subtraction returns the number of months 1. PERIOD_DIFF (P1, P2) returns the number of months between the period P1 and P2 (the format of P1 and P2 is YYMM or YYYYMM). Example: SELECT PERIOD_DIFF (DATE_FORMAT (g. VALIDITY, '% Y % m'),

Mysql Log command

The mysql log command has the following types of logs:-log-err query log:-log slow query log:-log-slow-queries Update log: -log-update BINARY log:-log-bin in the mysql installation directory, open my. ini, add the above parameters to the end, save

Use of MYSQL Foreign Key -- modify (ADD) Foreign Key method, Foreign Key names cannot have repeated

Use of MYSQL Foreign Key -- modify (ADD) Foreign Key method, Foreign Key names cannot have repeated 1. caseNumber in case_detail created in wms today cannot be associated with case_head. An error is prompted several times after the result is created,

EXPLAIN commands in MySQL

The EXPLAIN command in MySQL shows how mysql uses indexes to process select statements and connect tables. It can help you select better indexes and write more optimized query statements. You can use the explain statement before the select statement,

Mysql simulated queue

Mysql simulation queue Java code -- initialization data drop table if exists t_msg_queues; create table t_msg_queues (msg_id bigint unsigned not null AUTO_INCREMENT, msg_content VARCHAR (255) not null, owner_thread_id int not null default-1, primary

Coupling Between Redis and MySQL and efficient migration from MySQL to Redis using Pipelines

Talking about the coupling between Redis and MySQL and the efficient migration from MySQL to Redis using pipelines (I) coupling between Redis and MySQL in the early stage of the business architecture, we should "look at the pot in a bowl ", don't

Potential risks of modifying the default character set of a table in mysql

Potential risks arising from modifying the default character set of a mysql TABLE if you need to modify the default character set of the TABLE after creating the TABLE, you can use alter table to modify the default character set of the TABLE. alter

Key_buffer_size settings in MyISAM

In MyISAM, key_buffer_size settings Key_read_requests and Key_reads are two counters. Their meanings are as follows: Key_read_requests: the number of requests that read the index from the cache. Key_reads: the number of requests that read the index

Mysql dynamically creates and deletes a partition table

Mysql dynamically creates and deletes partition tables because of project requirements. Recently, I have studied how to dynamically create and delete partition tables in the mysql database. If all stored procedures are used, creating and deleting

MySQL running condition Query Method

MySQL running STATUS query method: run show status directly in the command line to log on to MySQL and run show status. query statements, such as show variables in the same statement. show status is used to view the running STATUS of MySQL, it is

Mysql dual-host exceptions and Solutions

Mysql dual-host exception and solution today, Mysql dual-host encountered two problems. Sort out the solution from the Internet and record it: run the following command to view the exception information: SQL code mysql> show slave status \ G; for

MySQL authorization (allow slave server users to log on to the master server)

MySQL authorization (allowing slave server users to log on to the master server) 1. view the user authorization table select user,host,password from mysql.user;  2. Set a password for the user update mysql.user set password=PASSWORD('root') where

Clear and disable Binary logs of MySQL

The Binary logs of MySQL is cleared and disabled. Recently, MySQL has been flushed. Binary Log eats more than 800 MiB of hard disk space, which interferes with the normal operation of the system. There are many solutions, including directly deleting

Mysql replace ()

I have talked about using the update and replace functions in mysql to replace the specified content in batches. In fact, the method is very simple. The syntax for batch replacement is as follows: The Code is as follows: Copy code

Mysql Database Study Notes

Log on to MySQL: There must be no space before mysql-h localhost-u root-ptest password; otherwise, you must re-enter the password. Mysql-h110.110.110.110-u root-p 123;     MySQL Command collection 1. Connect to MYSQL. Format: mysql-h host address-u

Import A. SQL file in mysql command mode

I have introduced a lot about Database Import before. Today we want to talk about an instance which is a method for importing database files under DOS. If you need it, you can check it out. Enter the bin directory of mysql If you want to import SQL

Common mysql database connection strings

Common mysql tutorial database tutorial connection stringMyODBC MyODBC 2.50 local database  Driver = {mySQL}; Server = localhost; Option = 16834; Database = myDataBase;   MyODBC 2.50 remote database  Driver = {mySQL}; Server = myServerAddress; Port =

Create a database in mysql and delete a database instance

Create a database in the mysql tutorial and delete a database instance Create database ; Mysql>Mysql>Mysql> create database myDatabase;Query OK, 1 row affected (0.03 sec) Mysql>Mysql> drop database myDatabase;Query OK, 0 rows affected (0.01

Mysql procedure Stored procedure loop, condition judgment instance

Mysql tutorial procedure Stored procedure loop, condition judgment instance   Mysql> delimiter $Mysql> create procedure myProc ()-> DETERMINISTIC-> BEGIN-> DECLARE counter int default 0;->-> Simple_loop: LOOP-> SET counter = counter + 1;-> Select

Total Pages: 3233 1 .... 3216 3217 3218 3219 3220 .... 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.