Linux MySQL and linuxmysql
MySQL database
The first product line: 5.0.xx and the product series upgraded to 5.1.xx. This product line continues to improve and improve its user experience and performance, while adding new features.
Article 2 Product Line: in order to better integrate the new storage engine developed by the MySQL AB Community and third-party companies, and absorb new implementations and algorithms, this product line better supports the SMP architecture, A lot of code refactoring has been done to improve performance. The version number has evolved from 5.4.xx to 5.7.xx.
Article 3 product line: to better promote the MySQL Cluster version, improve the performance and stability of the MySQL Cluster, improve and increase functions, and modify basic MySQL functions, to provide more effective support and optimization for the Cluster Storage engine. The version is 6.0.xx and has been developed to 7.1.xx.
Install MySQL
How to install Linux software
1. yum/rpm is simple and fast and cannot be customized,
2. Compile and install./configure; make install. Complex, slow to count, customizable.
For mysql, the Compilation Method of the first product line is 5.0-5.1.
Mysql5.5 or above, compilation and installation,./cmake; gmake install.
3. decompress the Binary Package. Simple, fast, and hard to customize.
Mysql-5.5.32-linux2.6-x86_64.tar.gz
Create a mysql user
Extract
Move to the installation directory and create a soft connection
This step is equivalent to compiling and installing make install.
Initialize Database
Authorize mysql users to manage mysql
Two OK statements are displayed, indicating that the operation is successful.
Generate MySQL configuration file
Configure to start MySQL
Start MySQL in the background
Configure Environment Variables
Logon Test
Configure the traditional method to start MySQL
Set Password
Change Password
Interactive login to mysql
Use delete to delete special characters or uppercase letters.
Finally, execute refresh to make the permission take effect.
Query all databases: show databases;
Sharding: use mysql;
Table query: show tables;
View the user list: select user, host from mysql. user;
View Current user: select user ();
View the current database: select database ();
Delete database: drop database name;
Delete user: drop user 'username' @ 'host ';