What is MySQL? It is an open source relational DataBase Management System (DBMS) that based on clientserver model. MySQL is owned by Oracle Corporation and it is considered one of the most and widely used DBMS. There are two main components that necessarily to create, manage, and manipulate MySQL database: MySQL sever (or just MySQL) and MySQL Workbench. MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more [1]. How to get MySQL? Check MySQL downloads page at http://dev.mysql.com/downloads/ for information about MySQL current versions. Follow these instructions to download MySQL server and workbench: * Microsoft Windows 1. Go to the download page and select MySQL Community Server (see Figure 1. a). 2. Download MySQL Installer MSI. Note that it is for Windows (x86, 32 bit) but it will work completely fine for Windows (64 bit) (see Figure 1. b). 3. Select and download the MySQL installer with 5.7.9.1 release number and 371.2M size (mysql-installer-community-5.7.9.1.msi). Figure 1. a Figure 1. b By: Arwa M. Alturki 1
* Mac OS X 1. Go to the download page and select MySQL Community Server (see Figure 1. a). 2. Depending on your OS version, select and download the suitable server DMG Archive file (see Figure 2. a). 3. Go back to the download page and select MySQL Workbench (see Figure 2. b). 4. Download the workbench DMG Archive (see Figure 2. c). Figure 2. a Figure 2. b Figure 2. c MySQL Installation Follow these instructions to install MySQL server and workbench: Windows MySQL Installer MSI needs to.net Framework 4.0 to run. If your computer does not have it already, kindly download it from Microsoft downloads center at http://www.microsoft.com/en-sa/download/details.aspx?id=17851. By: Arwa M. Alturki 2
* Microsoft Windows 1. Open the MySQL installer (mysql-installer-community-5.7.9.1.msi). 2. Accept the license term then click Next (see Figure 3. a). 3. Select Custom as the setup type then click Next (see Figure 3. b). 4. From the Available Products list, select the MySQL server 5.7.9 X86 and click the small arrow button to add it to the Products/Features To Be Installed list. Repeat the same steps to add MySQL Workbench 6.3.5 X86 to the list of Products/Features To Be Installed, then click Next (see Figure 3. c). Figure 3. a Figure 3. b Figure 3. c 5. The installer will check the software requirements such as Microsoft Visual C++ 2013 Runtime, which is usually not installed on your computer. Click Execute to allow MySQL installer to automatically download and install it for you. Follow Microsoft Visual C++ 2013 wizard to complete the setup. After that the resolved requirement will By: Arwa M. Alturki 3
be checked with a small green check-mark. Click Next to proceed in MySQL installation (see Figure 3. d and Figure 3. e). 6. Click Execute to install MySQL server and workbench packages. When the installation is completed, the installed packages will be marked by a small green check-mark. Click Next to proceed to MySQL configuration (see Figure 3. f and Figure 3. g). 7. Click Next to start the configurations, click Next again to agree on type and networking settings (see Figure 3. h and Figure 3. i). Figure 3. d Figure 3. e Figure 3. f Figure 3. g 8. In accounts and roles settings, enter your root password then click Next. Note: if your device has an old version of MySQL, the installer will ask you to enter the old password. Click Next again to agree on Windows service (see Figure 3. j and Figure 3. k). 9. Click Execute to apply server configuration, then Finish to complete the installation process (see Figure 3. l and Figure 3. m). 10. Congratulation, MySQL server and workbench are installed completely on your computer. By: Arwa M. Alturki 4
Figure 3. h Figure 3. i Figure 3. j Figure 3. k Figure 3. l Figure 3. m By: Arwa M. Alturki 5
* Mac OS X 1. Open the MySQL server DMG archive file, then open MySQL 5.7.9 package. 2. The MySQL installer will start, click Continue to proceed on (see Figure 4. a). 3. Agree on the license agreement to continue installing the MySQL server, then click Continue. You may be asked to enter the computer password (see Figure 4. b). 4. Choose the install location (Macintosh HD is the standard one) then click Install (Figure 4. c). Figure 4. a Figure 4. b Figure 4. c 5. Wait until the installation complete. After that MySQL server will generate a temporary password, keep it and do not loos it (see Figure 4. d and Figure 4. e). 6. Go to System Preference in your computer, then go to the MySQL preference. You will see that the MySQL server instance is stopped, click on Start MySQL Server to run it (see Figure 4. f, Figure 4. g and Figure 4. h). 7. Open the MySQL Workbench DMG archive file, then drag MySQL Workbench logo to the Application folder (see Figure 4. i). By: Arwa M. Alturki 6
8. Congratulation, MySQL server and workbench are installed completely on your computer. Figure 4. d Figure 4. e Figure 4. f Figure 4. g Figure 4. h By: Arwa M. Alturki 7
Figure 4. i Open MySQL Workbench for The First Time When you open the workbench for the first time, you will find a local instance under MySQL Connections- that automatically created by the MySQL (see Figure 5. a). In order to connect to the local instance; click on it, MySQL will prompt for the MySQL password (the autogenerated one for Mac users), enter it then click Ok (see Figure 5. b). The workbench will open the SQL editor (see Figure 5. c). Figure 5. a By: Arwa M. Alturki 8
Figure 5. b Figure 5. c If your OS is Mac, when you try to open a connection for the first time, MySQL will ask you to enter a new password since the old one is expired. Enter a new password, confirm it and click Ok. The new password will be used later for all connections. In case you want to create a new connection, click on the plus icon (+) that appears next to the MySQL connections, setup a new connection window will open (see Figure 5. a and Figure 5. d). Enter the new connection name and click Ok (see Figure 5. e). Figure 5. d Figure 5. e References [1] MySQL Workbench Manual, Oracle Corporation, Redwood Shores, CA, 2015. [2] MySQL 5.7 Reference Manual, Oracle Corporation, Redwood Shores, CA, 2015. By: Arwa M. Alturki 9