We will create 2 VMs by importing the OVA file provided in the lab
- Install Oracle Virtualbox by downloading the latest Virtualbox from here: https://www.virtualbox.org/wiki/Downloads
- Install the Virtualbox Extenstion Pack
- Install putty from here: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
- Once Virtualbox is installed, import the Virtualbox OVA file provided (202002-MySQLWorkshop8019.ova)
- Change the following: Name: MySQLnode1 Mac Address Policy: Generate new MAC addresses for all network adapters
- Start importing by clicking on "Import"
-
Once the import completes, you should have the VM imported in Virtualbox in "Powered Off" mode
-
Repeat the same "Import" process to create the second VM and renamed to "MySQLnode2"
-
Run putty to connect to 192.168.56.41 and you are ready to go (the first VM, MySQLnode1)
user id: mysql
password: mysql
-
Shutdown the MySQLnode1 VM
-
Power up MySQLnode2 VM, connect to MySQLnode2 using putty (192.168.56.41)
sudo nmtui
- Select enp0s3 interface, change the ip address to 192.168.56.42, save and exit
In order to save space on your main drive, you can move the huge VM disk files to another drive, for example, an external hard disk
- Remove the VM disk files from the VM
-
Copy the 2 disk files from your C:\ drive (usually stored in \VirtualBox VMs\MySQLnode1) to the external drive
-
You need to re-generate UUIDs of the moved disk file
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands sethduuid 202002-MySQLWorkshop8019-disk001.vdi
"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" internalcommands sethduuid 202002-MySQLWorkshop8019-disk002.vdi
- Add the new location of the disk files back to the VM settings under SATA Controllers
- Once the moved disk files are added back to the VM settings, you can start powering up the VM
-
Install MySQL Workbench on your laptop
-
Configure connection to MySQLnode1
- Make sure "Remote Management" is enabled with "SSH login based management"
- Edit "System Profile"
System Type: Linux
Installation Type: Custom
Configuration File: /opt/download/lab/02-Admin/config/my1.cnf
Start MySQL: /usr/local/mysql/bin/mysqld_safe --default_file=/opt/download/lab/02-Admin/config/my1.cnf &
Stop MySQL: /usr/local/mysql/bin/mysql -uroot -h127.0.0.1 -P3306 -pmysql -e"shutdown;"
- Test connection to make sure Workbench can connect to MySQL