Installing MySQL database in Linux

Source: Internet
Author: User
Tags auth

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.