Category: Database

MySQL (102)
Oracle (26)
Redis (8)
SQLServer (2)

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 …

Common MySQL Statements

(1) Create, Delete, and Basic Queries: Show databases mysql->show databases;Create database mysql->create database db;Drop database  mysql->drop database db;Select database mysql->use dbCreate table mysql->cre …