Install MySQL Workbench on Linux (Centos)
# yum install mysql-workbench-community -y
Verify if vnc server is installed
[root@centos01 ~]# rpm -qa | grep -i vnc
# yum install tigervnc-server
https://www.tecmint.com/install-and-configure-vnc-server-in-
centos-7/
Login with the user you want to run the VNC program with. In my case its root.
# vncpasswd
Now, add a VNC service configuration file for your user via a daemon
configuration file placed in systemd directory tree
[root@centos01 ~]# ls -l /lib/systemd/system/vnc*
-rw-r--r--. 1 root root 1707 Apr 5 09:49
/lib/systemd/system/vncserver@.service
cp /lib/systemd/system/vncserver@.service
/etc/systemd/system/vncserver@:1.service
vi /etc/systemd/system/vncserver@:1.service
Alternatively:
[root@centos01 ~]# useradd vnc
[root@centos01 ~]# passwd vnc
Login as vnc user
$ vncpasswd
yum install xclock -y
# systemctl daemon-reload
# systemctl start vncserver@:1
# systemctl status vncserver@:1
# systemctl enable vncserver@:1
https://www.realvnc.com/en/connect/download/viewer/
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY
'Molafako27##';
Query OK, 0 rows affected (0.04 sec)
mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'Molafako27##';
Query OK, 0 rows affected (0.03 sec)
mysql> GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0.05 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.02 sec)
Install xming on windows machine
# Install xming on windows machine and run xming
On Linux:
# yum install xclock -y
export DISPLAY=192.168.56.1:0.0
xclock
Search for xming launch and step through
Open putty, connect to server and set X11 settings
Replace localhost with the IP of Windows machine.
# mysql-workbench &
use mysql;
show databases;
select user, host, authentication_string from user;
desc user;
- Where is your data directory?
- Where is your Error Log?
- How many schemas do you see?
- Run show databases;
- Go to your data directory and see how are the schemas stored on
the disk
Install sample databases: world, employees, sakila etc.
https://dev.mysql.com/doc/index-other.html
https://github.com/datacharmer/test_db
cd /opt
git clone https://github.com/datacharmer/test_db.git
ls -l
cd test_db
ls -l
mysql < employees.sql
The mysql client needs all the options to login:
mysql -u root -p < employees.sql
cd /opt
wget https://downloads.mysql.com/docs/world-db.zip
unzip world-db.zip
mysql -u root -p < world.sql
NB: Login and create database world
mysql -u root -p world < world.sql
cd /opt
wget https://downloads.mysql.com/docs/sakila-db.zip
unzip sakila-db.zip
ls -l
sakila-schema.sql
sakila-data.sql
Examine:
sakila-schema.sql
sakila-data.sql