Miss Zhu 2022-02-13 08:39:04 阅读数:196
stay CentOS7 Lower installation MySQL:
1. Download and install mysql
Sure Windows download rpm Upload the installation package to Linux Or use it directly yum Download and install , The latter method is used in this paper
add to mysql rpm Warehouse
rpm -ivh https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
Download and install
yum -y install mysql-community-server
The process is slow , Appear below , It means success :
2. start-up mysql
systemctl start mysqld
Check the status
systemctl status mysqld
View version number
mysqladmin --version
3. Sign in Mysql
Check the original password :
cat /var/log/mysqld.log | grep -i 'temporary password'
Sign in mysql
mysql -uroot -p
As shown in the figure below , Enter the password you just viewed , Note that the screen will not display characters , Press enter after normal input .
Here you can use SQL, Conduct MYSQL operation .
4. Change Password
The password is complex , You can change the password , Pay attention to the rules : Alphanumeric special characters case , This article USES the Hive123+
ALTER USER 'root'@'localhost' IDENTIFIED BY '********';
***** The password set for , Note that you need to include upper and lower case alphanumeric characters and special symbols
5. Set up remote access
Use mysql library 、 Modify the accessible domain 、 Refresh the permissions
use mysql;
update user set host='%' where user='root';
flush privileges;
The above commands are shown in the figure below :
Use Navicat visit
copyright:author[Miss Zhu],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130839020038.html