In using VMware virtual machines and Centos7 system
Virtual machine installed here much talked about, a lot of online tutorials, here describes the network configuration of the virtual machine.
Virtual machine network
Centos network connection mode is set here bridge mode without checking the physical network connection state replication
And install it from the command line
$ Su next line to enter a password to obtain root privileges
$ Cd / etc / sysconfig / network-scripts to enter the directory
$ Vi ifcfg-ens33 file where the file name may be different
And so we will connect to the virtual machine by Xshell, here we fixed virtual machine IP.
The BOOTPROTO set to none or static;
ONBOOT whether to activate the boot NIC yes
IPV6 useless set to no;
Here IPADDR (virtual machine Ip address) and GATEWAY (gateway) note at:
Open the Windows cmd, input ipConfig / all to view the network configuration information for the host
IP address of the virtual machine and the host needs an IP address on the same network segment, the default gateway to be the same.
Once configured you can see if the network connection in a virtual machine ping www.baidu.com.
Finally, you can connect to a virtual machine through Xshell, there are many tutorials few repeat them here.
Configure MySQL in the Xshell
First install wget service equivalent to the depot.
Command Line:
yum install wget -y install wget Service
wget https://dev.mysql.com/get/Down1oads/MySQL-8.0/mysql-8.0.15-linux-glibc2.12-x86_64.tar.xz the compressed file to install mysql
xz -d mysql-8.0.15-linux-glibc2.12-x86_64.tar.xz decompressed file is converted by the tar xz
By tar -xvf mysql-8.0.15-linux-glibc2.12-x86_64.tar extract files
Then mysql-8.0.15-linux-glibc2.12-x86_64 file to the / usr / local / mysql directory
mv mysql-8.0.15-linux-glibc2.12-x86_64 /usr/local/mysql
Start mysql
Add mysql account
adduser mysql
Replace /etc/my.cnf file provides the file here my.cnf download link to download my.zip unzip
Then continue to build three directories in the mysql directory
mkdir data (database files) sql_log (log files) undo
These are three directories to change the user mysql
chown mysql:mysql -R data/ sql_log/ undo/
Initialized MYSQL
Configuration System Variables
vi / etc / profile
Files added at the end export PATH = $ PATH: / usr / local / mysql / bin
source / etc / profile variables to take effect
initialization
mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data
Then proceed to the next in the mysql directory
cd support-files
cp mysql.server /etc/init.d/mysqld
/etc/init.d/mysqld start start mysql service
Change mysql password
Or in the mysql directory
cd sql_log
grep password mysql-error.log
The initial password red box marked
mysql -uroot -p login mysql
alter user user () identified by 'new password';