Get the App
SLTechnology News&Howtos  ›  Database  › 

Analysis on installation and Application of MySQL Database system

Shulou Source: shulou.com Published: 2022-06-01 20:14:51 10月29日 Update

The following mainly brings you to install the application of MySQL database system analysis, I hope that these words can bring you practical use, which is also the main purpose of my editing this article. All right, don't talk too much nonsense, let's just read the following.

1. Uninstall the original mysql

In the figure above, mysql was installed using rpm, so use rpm-e msyql-- nodeps to uninstall

2. Before installing mysql, you need to install the software development package. If you check "Software Development" when installing the operating system, you do not need to install it.

3. Mount the CD of the mysql software package

4. Open it after mounting

5. Mysql5.5 needs to be installed with cmake compilation and installation, so install the cmakepackage first.

6. Create and run users and unpack

7. Configuration

Cmake-DCMAKE_INSTALL_PREFIX=/usr/local/mysql-DSYSCONFDIR=/etc/-DDEFAULT_CHARSET=utf8-DDEFAULT_COLLATION=utf8_general_ci-DWITH_EXTRA_CHARSETS=all

8. Compile and install

9. Other adjustments after installation

1) permission setting

2) establish a configuration file

Cp support-files/my-medium.cnf / etc/my.cnf

3) initialize the database

4) set environment variables

Note that the last line above is:. / etc/profile (click on the space and enter / etc/profile)

10. Add system services

11. Enable mysql service

12. Access mysql database

13. Basic orders

1) check which databases are in the current server

2) check which tables are in the mysql database

3) View the structure of the users table

14. Commonly used commands

1) create a new database auth and table users

2) Delete users table and auth database

3) insert data

4) query data

The statement of addition, deletion, modification and query is exactly the same as that of sqlserver. You can refer to the sqlserver statement. I will not demonstrate it in detail here.

15. User authorization of database

1) create a new user xiaoqi and grant select permissions to all tables in the auth database

2) Log in to the server using xiaoqi

3) create a new database bdqn and authorize the host connection from the ip address 192.168.4.19 with the user name dbuser and password pwd@123, allowing any operation in the bdqn database

Tags: Data database permissions backup user system command software service file statement application following host content address password server software package software development Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MySQL vpn Microsoft Linux