Linux installation MySQLDatabase System
1, uninstall the original MySQL (rpm-e mysql--nodeps)
2. installation MySQL before, you need to install a software development package, and if you check "software development" when installing the operating system,
You don't have to install it.
This step is to install a dependency package that does not have software development installed, which can be omitted if installed
3.
1. Mount the MySQL software package CD
2. Install CMake to compile the installation package before installing MySQL
3, then go to unzip the configuration to install the MySQL software
4. Create a Run user reconciliation package
5. additional adjustments after installation
1) permission settings
2) setting up the configuration file
2) initializing the database
2) setting environment variables
Note that the last line above is: . /etc/profile( space after dot and enter /etc/profile)
10. Adding system Services
10. turn on MySQL service
10. Access MySQL database
10 . Basic Commands
1) See what databases are in the current server
1) See What tables are in the MySQL database
1) View The structure of the Users table
14 . Common Commands
1) Create a new database auth and tables users
1) Delete the Users table and the auth database
1) inserting data
1) query data
15, the user authorization of the database
1) Create a new user Xiaoqiand give the Select permission to all tables in the AUTH database
2) Log in to the server using Xiaoqi
and query
2) Create a new database BDQN, and authorize the host connection from the IP address 192.168.4.19, the user name is Dbuser,
Password is [Email protected] , allowing any action to be taken in the bdqn database
2) View permissions
Show grants for ' dbuser ' @ ' 192.168.4.19 '
3) revoke permissions
First look at the permissions that are already available
EXECUTE command REVOKE permission Revoke all on auth.* from ' xiaoqi ' @ ' localhost '
View Permissions again
16 . Backup and recovery of database
Backing up tables, backing up libraries, backing up all libraries
16. Delete the table users andthen restore
View table has been restored
Installing MySQL database in Linux