当前位置:网站首页>Installation and application of MySQL 8.0 under Linux
Installation and application of MySQL 8.0 under Linux
2022-06-21 13:41:00 【Guo Mahua】
Linux Next MySql 8.0 Installation and Application
Add
- 8.0 There are some differences with the previous version , Many old versions of the commands on the Internet are no longer applicable , We should pay attention to distinguish . You can refer to this
- When I install on Alibaba cloud server mysql, And set up the database 、 After the server , Found during local testing navicat Only through SSH The way to connect , Not directly through ip&port Connect . After the screening , Because mysqld.cnf file ( stay etc Under the table of contents ) Bound in ip by 127.0.0.1 As a result of , Change it to 0.0.0.0, Just restart the service ( It can be used netstat -an | grep 3306 Check it out. ).
operating system :Ubuntu 20.04 64 position
install mysql
- apt update
- apt install mysql
Create database
> mysql -u root
> use mysql
> create database mahuablog
Create table
> use mahuablog
> create table BlogTag(
> Id int primary key auto_increment,
> Name varchar(20) not null,
> Color int);
install Mycli Tools
root> apt install mycli
root> mycli -u root
mysql>
The tool provides sql Highlight , Intelligent prompt and other functions .
Let go of the port , Open remote connection
- Install firewall commands ufw
> apt install ufw
- View current status
> ufw status
- Let go of the port
> ufw allow 3306
- restart
> ufw reload
modify mysql The configuration file
> cd /etc/mysql/mysql.conf.d
> vi mysqld.cnf
find bind-address =‘127.0.0.1’, Change it to bind-address = 0.0.0.0 Then save to exit
> sudo service mysql restart
Connect remotely to mysql
Generally speaking , Direct use ROOT The user's account and password cannot be used to connect , The instant password is correct .
MYSQL 8.0 Newly added in mysql_native_password function , Make a remote connection by changing the password of this function
mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password by ' Your password '
边栏推荐
- 2. reference
- PHP uses grafika to synthesize pictures and generate poster images
- Lamp architecture 6 -- MySQL master-slave replication and optimization method
- Must the database primary key be self incremented? What scenarios do not suggest self augmentation?
- Sort query results according to the input order of fuzzy query jancode
- Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection
- Which futures trading platform is more secure. Ask for recommendation.
- Artifacial Intelligent Project
- C language -- program compilation and linking
- Hands on data analysis unit 2 section 4 data visualization
猜你喜欢

Distributed transactions, simple in principle, are all pits in writing

17 commonly used o & M monitoring systems

Nouveau partage de l'expérience de travail à domicile

618 Nuggets digital collection? Burberry and other luxury brands fight against metauniverse

Repair for a while, decisively reconstruct and take responsibility -- talk about CRM distributed cache optimization

What is Devops in an article?

5000 word analysis: the way of container security attack and defense in actual combat scenarios

Highly available configuration of database (MySQL)

Hands on data analysis unit 2 section 4 data visualization

Use map set or list set to store list set
随机推荐
微证券开户正规安全吗,怎么操作开户?
Kubernets Rapid Practical fighting and Core Principle Analysis
Application configuration management, basic principle analysis
如何使用搜索引擎?
IMU selection, calibration error analysis, AHRS integrated navigation
【深入理解TcaplusDB技术】TcaplusDB业务数据备份
Analysis on the wallet system architecture of Baidu trading platform
4. procedure flow structure
seaborn数据总体分布的可视化策略
Pingcap was selected as the "voice of customers" of Gartner cloud database in 2022, and won the highest score of "outstanding performer"
How to write test cases
C language elementary level (IX) enumeration
基于STM32电压检测和电流检测
PHP uses grafika to synthesize pictures and generate poster images
Eureka的TimedSupervisorTask类(自动调节间隔的周期性任务)
Lamp architecture 4 -- MySQL source code compilation and use
Automatic operation and maintenance 3 - using playbook in ansible
[deeply understand tcapulusdb technology] tmonitor background one click installation
Solution to the problem of long waiting (ttfb) time during web page loading
Highly available configuration of database (MySQL)