当前位置:网站首页>Installing MySQL under Linux (CentOS 7)
Installing MySQL under Linux (CentOS 7)
2022-06-25 20:12:00 【chinrock】
download mysql Installation package
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
install
yum -y install mysql57-community-release-el7-10.noarch.rpm
install mysql service
yum -y install mysql-community-server
start-up mysql service
systemctl start mysqld.service
see mysql Log when the service is started , Match view password , Then log in
grep "password" /var/log/mysqld.log
Sign in mysql
mysql -u root -p
Remember to change the password after login
alter user 'root'@'localhost' identified by 'root';# Password rules are all used
# uninstall Yum Repository
yum -y remove mysql57-community-release-el7-10.noarch
#mysql Common commands
systemctl start mysqld.service # Opening service
systemctl stop mysqld.service # Close the service
systemctl status mysqld.service # View service status
mysql -u root -p # Get into mysql Command window
mysql> show databases; # View all databases
mysql> use Database name ; # Use this data for editing
mysql> show tables; # View all tables in a database
1. Remote connection database , use navicat Remote connection database error 1103
Need to open the firewall 3306 port
zone Scope
add-port=80/tcp Add port , port / Communication protocol
permanent permanent ( Restart without this parameter is invalid )
sudo firewall-cmd --zone=public --add-port=3306/tcp --permanent
Turn on 3306 After the port , Firewall must be restarted ,naivcat You can connect to MySQL Database
sudo systemctl restart firewalld.service
Create a remote connection user root; password :root
mysql -uroot -p
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
flush privileges;
Finally, the connection was successful
边栏推荐
- 在打新債開戶證券安全嗎?低傭金靠譜嗎
- Curtain down and departure
- Arduino ide + esp8266+mqtt subscribe to publish temperature and humidity information
- Mqtt+ardunio+esp8266 development (excluding mqtt server deployment)
- Yum command
- Pcl+vs2019 configuration and some source code test cases and demos
- JQ implements tab switching
- 2.16([Usaco2005 Nov]Ant Counting)
- Swin UNET reading notes
- My official account writing experience sharing
猜你喜欢

Redis core article: the secret that can only be broken quickly

Jsonp non homologous interaction (click trigger)

Teach you how to create and publish a packaged NPM component

Redis practice: smart use of data types to achieve 100 million level data statistics

Use of serialize() and serializearray() methods for form data serialization

Li-rads lesion classification reading notes

<C>. tic-tac-toe

<C>. array

PAT B1086

Pcl+vs2019+opencv environment configuration
随机推荐
通过启牛学堂开的股票账户可以用吗?资金安全吗?
Pcl+vs2019 configuration and some source code test cases and demos
New features of php7
Jsonp non homologous interaction (click trigger)
The error log of vscode connecting to the server shows the problem of "insufficient permission". Directly use root to connect
[untitled]
Connect the local browser to the laboratory server through mobaxterm
PHP little knowledge record
JQ implements tab switching
Yaml configuration
Uniapp waterfall flow, applet waterfall flow, very simple, suitable for the whole platform
2.16([Usaco2005 Nov]Ant Counting)
Single chip microcomputer line selection method to store impression (address range) method + Example
PAT B1064
String since I can perform performance tuning, I can call an expert directly
Is it safe to open an account with a mobile phone? Where can I open an account to buy shares?
Profile path and name
Avoid material "minefields"! Play super high conversion rate
Pcl+vs2019+opencv environment configuration
Huawei HMS core launched a new member conversion & retention prediction model