Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to download and install mysql

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to download and install mysql. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Download and install

MySQL is a relational database management system developed by the Swedish company MySQL AB and currently belongs to the Oracle company. MySQL is the most popular relational database management system. MySQL is one of the best RDBMS (Relational Database Management System, relational database management system) applications in WEB applications.

If you want to use MySQL to store and manipulate data, you need to do a few things:

a. Install the MySQL server

b. Install the MySQL client

B. [client] connects [server]

C. [client] sends commands to accept commands of [server MySQL] service and performs corresponding operations (additions, deletions, modifications, queries, etc.)

Download: http://dev.mysql.com/downloads/mysql/

Installation

Windows: little by little

Linux:yum install mysql-server

Mac: little by little

1 extract to any directory

2 the server side is running

Windows Service:

Cmd E:\ 01-Software\ Test Software\ 13 mysql\ mysql-8.0.12-winx64\ bin\ mysqld-install

Net start mysql Startup Service

Cd / d E:\ 01-Software\ Test Software\ 13 mysql\ mysql-8.0.12-winx64\ bin

Mysqld

Initialize naming:

Mysqld-initialize-insecure creates a root user without a password

3 the client modifies the environment variable

Variable name: MYSQL_HOME

Variable value: d:\ mysql-5.7.20-winx64

Add:% MYSQL_HOME%\ bin to path

Computer-> Properties-> Advanced system configuration

Start the MySQL service

Net start mysql

Turn off the MySQL service

Net stop mysql

Linux

Installation: yum install mysql-server

Server startup

Mysql.server start

Client connection

Connection: mysql-h host-u user-p

Common errors:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket'/ tmp/mysql.sock' (2), it means that the MySQL server daemon (Unix) or service (Windows) is not running.

Exit: QUIT or Control+D

II. Database operation

1. Display the database

Show databases

Mysql-data related to user rights

Test-for user test data

Information_schema-MySQL itself constructs relevant data

2. Create a database

# utf-8CREATE DATABASE database name DEFAULT CHARSET utf8 COLLATE utf8_general_ci;# gbkCREATE DATABASE database name DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci

3. Use the database

Use db_name

4. User management

View users

Select host,user from mysql.user

Create a user

Create user 'username' @'IP address' identified by 'password'

Delete user

Drop user 'user name' @'IP address'

Modify user

Rename user 'user name' @'IP address'; to 'new user name' @'IP address'

Modify the password

Set password for 'username' @'IP address'= Password ('new password')

PS: user rights-related data is saved in the user table of the mysql database, so it can also be manipulated directly (not recommended)

5. Authorization management

Show grants for 'user' @'IP address'- View permissions

Grant permissions on database. Table to 'user' @'IP address'- Authorization

Revoke permissions on database. Table from 'user' @'IP address'- revoke permissions

All permissions of all privileges except grant

Select check permissions only

Select,insert lookup and insert permissions

...

Usage has no access permission

Alter uses alter table

Alter routine uses alter procedure and drop procedure

Create uses create table

Create routine uses create procedure

Create temporary tables uses create temporary tables

Create user uses create user, drop user, rename user, and revoke all privileges

Create view uses create view

Delete uses delete

Drop uses drop table

Execute uses call and stored procedures

File uses select into outfile and load data infile

Grant option uses grant and revoke

Index uses index

Insert uses insert

Lock tables uses lock table

Process uses show full processlist

Select uses select

Show databases uses show databases

Show view uses show view

Update uses update

Reload uses flush

Shutdown uses mysqladmin shutdown (turn off MySQL)

Super

Thank you for reading! About how to download and install mysql to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report