Category: Database

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

How to Reset a Forgotten MySQL Password

Modify the configuration file and add skip_grant_tables. Edit the configuration file:
vi /etc/my.cnf
Add the following under the [mysqld] section of the configuration file:
skip_grant_tables

Restart MySQL:
service mysqld restart
Access the database without a password and set a new one. Enter without a password:
mysql …

MySQL Error Fix: Your Password Has Expired

Error message as follows:
Error when connecting to server: Your password has expired. To log in you must change it using a client that supports expired passwords.

Log into mysql, set a new password, and set it to never expire:
my …

MySQL Performance Testing with mysqlslap

MySQL comes with its own stress-testing tool, mysqlslap.

Here is an example testing 500 concurrent connections and running the test 10 times:
mysqlslap -a -c 500 -i 10 -uroot -p123456
The results are as follows:

How to Configure PL/SQL to Connect to Oracle

Software Download Address:

http://mirror.cnop.net/oracle/PLSQL_install.zip
or
http://share.cnop.net/file426/1806028-428340587

1. Extract and place this archive in the root directory of the system D drive:

2. Set Environment Variables:
User Variable Settings: Right-click My Computer …

How to Install Alibaba AliSQL

Install dependency packages yum install -y centos-release-scl devtoolset-4-gcc-c++ devtoolset-4-gcc cmake openssl-devel bison git gmock ncurses ncurses-* autoconf
Create account groupadd mysql && useradd -r -g mysq …

MySQL COUNT Query Group by Date

Sometimes queried data needs to be detailed down to daily statistics. The statement is as follows and can be modified according to your situation:

Taking the user table as an example, query daily signup counts and group by day. The signupTime field is a date in the format “2019-09-05 00:38:17”:

Query statement: select DATE_FORMAT(signup …