This article brings you a step-by-step tutorial (detailed) on downloading and installing MySQL. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
1. Download and install
MySQL is a relational database management system developed by the Swedish MySQL AB company and currently belongs to an Oracle company. MySQL is the most popular relational database management system. In terms of WEB applications, MySQL is one of the best RDBMS (Relational Database Management System) application software.
If you want to use MySQL to store and operate data, you need to do a few things:
a. Install the MySQL server
b. Install the MySQL client
b. [Client] Connect to [Server]
c. [Client] sends commands to [Server MySQL]. The service accepts commands and performs corresponding operations (add, delete, modify, check, etc.)
Download: http://dev. mysql.com/downloads/mysql/
Installation
windows: dot point
Linux: yum install mysql-server
Mac: Click and click
1 Extract to any directory;
2 Run on the server
Windows service:
cmd E:\01-Software\ Test software\13 mysql\mysql-8.0.12-winx64\bin\mysqld –install
net start mysql Start service
cd /d E:\01-Software\Test software\13 mysql\mysql-8.0.12-winx64\bin
mysqld
Initialization naming:
mysqld --initialize-insecure Create root user without password
3 The client modifies the environment variable
Variable name: MYSQL_HOME
Variable value: D:\mysql-5.7.20-winx64
Add to path: %MYSQL_HOME%\ bin;
Computer—>Properties—>Advanced System Configuration
Start MySQL service
net start mysql
Close MySQL service
net stop mysql
linux
Installation: yum install mysql-server
Service Client start
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
2. Database operation
1. Show databases
show databases;
mysql - User permissions related data
test - Used for user test data
information_schema - MySQL itself architecture related data
2. Create database
# utf-8 CREATE DATABASE 数据库名称 DEFAULT CHARSET utf8 COLLATE utf8_general_ci; # gbk CREATE DATABASE 数据库名称 DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci;
3. Using database
use db_name;
4, User management
View users
select host,user from mysql.user;
Create users
create user '用户名'@'IP地址' identified by '密码';
Delete users
drop user '用户名'@'IP地址';
Modify users
rename user '用户名'@'IP地址'; to '新用户名'@'IP地址';
Change password
set password for '用户名'@'IP地址' = Password('新密码')
PS: User permission-related data is stored in the user table of the mysql database, so you can also directly operate it (not recommended)
5. Authorization Management
show grants for 'user'@'IP address' . ##revoke permissions on database.table from 'user'@'IP address' -- revoke permissions
ALL PRIVILEGES Except Grant's ownership
Select only check permissions
select, Insert check and insert permissions
...
USAGE without access
Alter use Alter Table
# #Alter Routine uses the Create PROTE PROCEDure ## Create Table Tables# ATE User uses Create User, Drop User, Rename User, and Revoke All Privileges
Create View uses the Create View
DELETE to use Drop Table
EXECUTE
FILE to use SELECT Into Outfile and Load Data Infile
#. #Grant option grant and revoke
use index
Use show full processlist
Use select
Use show databases
show view Use show view
Use update
use update
using flush
use ‐ mysqladmin shutdown’s
The above is the detailed content of Mysql download and installation step tutorial (detailed). For more information, please follow other related articles on the PHP Chinese website!

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version
Chinese version, very easy to use

WebStorm Mac version
Useful JavaScript development tools