It is obvious that we will be needing both Selenium and MySql on our systems inorder to work with them. As we have already gone through installing and setting up the environment for the Selenium in our earlier framework section we ask you to kindly check them here.
In below we will be going through steps needed for installing and setting up the system for MySQL Database server. As usual we will be going with windows version of installation and for Mac and Linux visit MySQL official site for guidance, click here.
1. Visit their official site to download the installer
https://dev.mysql.com/downloads/installer/
2. Once downloaded, navigate the the package directory then click to start the installer.
3. Leave the default settings as it is and proceed, you will asked to create a superuser. Give the username and password to complete the installation.
4. Open services and check for MySql service, once the server is started and running open MqSql Workbench from Start Menu.
5. Once the MySQL workbench is opened you will be provided with the list of connections. By default you will have a single local connection with your username and default port 3306. Click it to open the MySQL editor.
6. You will see a similar MySQL editor opened, where you can execute your MySQL command or Create or Replicate or Connect to a remote database.
Below the schema at the left side you will find the list of available tables in the selected connection or database. Query area will allow you to write and execute the MySQL commands and then execute, whose result will be displayed at the bottom of the output area. This allow you to know whether the executed schema or the command is successful or not.
7. Inorder to connect with the remote database server, click add button on the home page of MySQL workbench. Enter the details and click finish to connect to remote database
8. Downloading MySQL driver , which is required in order Java to communicate with MySql Server. Visit https://dev.mysql.com/downloads/connector/j/ and choose Platform Independent in drop down then click download.
9. If you have maven project setup then visit the link https://mvnrepository.com/artifact/mysql/mysql-connector-java and copy the maven and update it in your pom.xml