当前位置:网站首页>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
边栏推荐
- PAT B1071
- 2.16([Usaco2005 Nov]Ant Counting)
- Delete the page specified in PDF and merge pdf
- II Traits (extractors)
- Pcl+vs2019 configuration and some source code test cases and demos
- VMware failed to prompt to lock this profile exclusively
- LNMP compilation and installation
- Short video is just the time. How can you quickly build your video creation ability in your app?
- Swin UNET reading notes
- 通过启牛学堂开的股票账户可以用吗?资金安全吗?
猜你喜欢

Swin UNET reading notes

Clickhouse disables automatic clearing of tables / columns, that is, disables TTL

CG kit explore high performance rendering on mobile terminal

String since I can perform performance tuning, I can call an expert directly

Huawei HMS core launched a new member conversion & retention prediction model

SQL statement select summary

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

<C>. Rolling phase division

Pta--7-20 exchange minimum and maximum (15 points)

Redis high availability: do you call this the principle of master-slave architecture data synchronization?
随机推荐
2.2 step tariff
Redis thread level reentrant distributed lock (different unique IDs can be locked cyclically)
Dice、Sensitivity、ppv、miou
Redis core article: the secret that can only be broken quickly
CG kit explore high performance rendering on mobile terminal
[untitled]
Connect the local browser to the laboratory server through mobaxterm
<C>. Rolling phase division
Panda weekly -2022/02/18
Remember to deploy selenium crawler on the server
PAT B1081
Redis is a loser. If you don't understand the usage specification, you will spoil it
打新债证券开户安全吗
Skills of CCF question 2
The functions in the applet page are better than those in app JS first execution solution
Database data type design (the most detailed in the whole network)
JS asynchronism (III. usage of generator and async/await)
Arduino ide + esp8266+mqtt subscribe to publish temperature and humidity information
Est - il sûr d'ouvrir un compte avec de nouvelles dettes? Une faible Commission est - elle crédible?
Pdf file download (the download name is the same as the file name)