Category: MySQL

Super Practical MySQL Database Common Commands Guide

1. Common MySQL Commands create database name; Create database use databasename; Select database drop database name Delete database directly, without prompt show tables; Display tables describe tablename; Detailed description of the table Add distinct to select …

How to Set Up Mutual MySQL Backup and Synchronization

MySQL supports unidirectional, asynchronous replication, in which one server acts as the master server while one or more other servers act as slave servers. The master server writes updates to binary log files and maintains an index of the log files to track log rotation.

When a slave server …

How to Enable MySQL Remote Connection

Entering MySQL

mysql -u root -p
password:123456

mysql> USE mysql; — Switch to the mysql DB Database changed mysql> — There is only one default root user, with an empty password, only allowing localhost connections mysql> — Next we will add another …

How to Fix MySQL and mysqladmin: Command Not Found

Sometimes after installing MySQL, typing the command `mysql` or `mysqladmin` directly will prompt that the command is not found. This is because the system looks for commands under `/usr/bin` by default. If the command is not in this directory, it naturally won’t be found. What we need to do is map a link to `/usr/bi …

How to Diagnose and Fix Slow MySQL Queries

This article analyzes the gradual slowdown of MySQL database server queries and proposes corresponding solutions. The specific analysis and solutions are as follows: It is often found that developers execute statements without indexes or statements without a limit n clause. These statements can have a significant impact on the database, for example…

How MySQL Timestamp Auto-Update Works

Apart from the common practice of having a “Create date” field in tables, other databases provide options for default values. MySQL also has a default value timestamp, but in MySQL, not only does inserting update the timestamp value, modifying the record does too!

Thus, it no longer serves as a creation date, but rather as an update date …

Deep Dive into MySQL 5.5 Partitioning Enhancements

MySQL 5.5 brings a host of enhancements, and while many — like semi-synchronous replication — have already been covered, the partitioning improvements have been overlooked and sometimes even misunderstood. In this post, we hope to shed some light on these cool enhancements, especially for those of us who …