Example Analysis of installing MYSQL in Virtual Machine centos7
Editor to share with you the virtual machine centos7 installation MYSQL example analysis, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Virtual machine centos7 system installation
Install CentOS-7-x86_64-Minimal: https://www.pianshen.com/article/5169307635/ under VMware
Mysql database installation check whether MySQL [root @ 192 network-scripts] # rpm-qa is installed | grep mysql activate the network
Use ip addr to view IP
[root@192 network-scripts] # ip addr
Open the network card
[root@192 network-scripts] # vi / etc/sysconfig/network-scripts/ifcfg-ens33
Modify the ONBOOT=yes to enable the network card to start the network
[root@192 network-scripts] # service network start
View ip addr
[root@192 ~] # ip addr
Check the ens33 property inet to get the IP address
Install lzrz [root @ 192 src] # yum install-y lrzsz download the MYSQL database rpm package
Https://repo.mysql.com/yum/mysql-5.5-community/el/7/x86_64/mysql-community-release-el7-5.noarch.rpm
Load rpm package [root@192 network-scripts] # rpm-ivh mysql-community-release-el7-5.noarch.rpm
After execution, two repo files, mysql-community.repo mysql-community-source.repo, are generated in the / etc/yum.repos.d/ directory.
Install MySQL [root @ 192 network-scripts] # yum install mysql-server to launch msyql [root @ 192 network-scripts] # systemctl start mysqld skip login verification [root@192 network-scripts] # vim / etc/my.cnf
Open the document and add "skip-grant-tables" to any line after [mysqld] to skip password verification, save the document and exit:: wq
Log in to mysql [root@192 network-scripts] # mysql-u root-p to view all current databases [root@192 network-scripts] # mysql > show databases; enter mysql database [root@192 network-scripts] # mysql > use mysql; to view all tables [root@192 network-scripts] # mysql > show tables; to view data in user table [root@192 network-scripts] # mysql > select Host, User,Password from user View the default storage engine: [root@192 network-scripts] # mysql > show variables like'% storage_engine%'; shutdown MySQL [root@192 network-scripts] # systemctl stop mysqld restart MySQL [root@192 network-scripts] # systemctl restart mysqld View MySQL running status [root@192 network-scripts] # systemctl status mysqld Settings boot [root@192 network-scripts] # systemctl enable mysqld close boot start [root@192 network-scripts] # systemctl disable mysqld Firewall
# View firewalld status
[root@192 network-scripts] # systemctl status firewalld Open Port / /-- permanent takes effect permanently. If you restart without this parameter, it becomes invalid [root@192 network-scripts] # firewall-cmd-- zone=public-- add-port=80/tcp-- permanent reload [root@192 network-scripts] # firewall-cmd-- reload.
Install mysql5.7: https://jingyan.baidu.com/article/ed2a5d1f2be1ef48f6be17d9.html in CentOS7 environment
The above is all the contents of the article "sample Analysis of installing MYSQL in Virtual Machine centos7". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!