See attached
Reference/Mac Version (3-1) mysql 8.0.26 install-use notes.pdf CNT 4714: MySQL Intro – Mac Version Page 1 Dr. Mark Llewellyn© CNT 4714: Enterprise Computing Fall 2021 Introduction To MySQL Installation Of MySQL 8.0.26 – Mac Version Department of Computer Science University of Central Florida Instructor : Dr. Mark Llewellyn Email:
[email protected] HEC 236, 407-823-2790 Office Hours via Zoom: T & Th: 12:30-1:30pm, W: 3:30-4:20pm Office Hours Zoom Details: Meeting ID: 924 3809 7405 Passcode: 983064 Q&A Sessions via Zoom: Meeting ID: 979 4233 7520 Passcode: 924179 CNT 4714: MySQL Intro – Mac Version Page 2 Dr. Mark Llewellyn© MySQL RDBMS • MySQL is a database server (although it does come with a set of simple client programs). The current stable version is 8.0.26 (released July 20, 2021) and can be downloaded from www.mysql.com. We’ll be using the Community Server edition. I’ll be showing the install on a Mac running the Big Sur 11.5.2 OS. (Note that Big Sur 11.1 or above will be required for running the latest MySQL Workbench app.) • It is typically used in thin client environments. In other words, it is used in client-server systems where the bulk of the processing and storage takes place on the server, and the client is little more than a dumb terminal. • MySQL performs multithreaded processing, which means that multiple clients are allowed to connect to it and run queries simultaneously. This makes MySQL extremely fast and well suited to client-server environments such as Web sites and other environments that process numerous transactions for multiple users. http://www.mysql.com/ CNT 4714: MySQL Intro – Mac Version Page 3 Dr. Mark Llewellyn© Click here to go to download page CNT 4714: MySQL Intro – Mac Version Page 4 Dr. Mark Llewellyn© This should be the next page you see. Scroll down this page until you find the MySQL Community Edition and click that link. CNT 4714: MySQL Intro – Mac Version Page 5 Dr. Mark Llewellyn© The MySQL Community Downloads page. Click on the the MySQL Community Server link CNT 4714: MySQL Intro – Mac Version Page 6 Dr. Mark Llewellyn© Use this selection window to select the version you want to download. Easiest is the DMG archive. There will be a registration/login page (see next two slides)…you can ignore this if you wish and go straight to the download. CNT 4714: MySQL Intro – Mac Version Page 7 Dr. Mark Llewellyn© Installing MySQL 8.0.26 (cont.) CNT 4714: MySQL Intro – Mac Version Page 8 Dr. Mark Llewellyn© Installing MySQL 8.0.26 (cont.) Click the button. Note this is shown on Safari, not all browsers will show this page. If you clicked the start download button on the previous page, it may just start downloading. CNT 4714: MySQL Intro – Mac Version Page 9 Dr. Mark Llewellyn© Go back to the main download page and also download MySQL Workbench which contains the Administrator and MySQL Query Browser GUI tools. CNT 4714: MySQL Intro – Mac Version Page 10 Dr. Mark Llewellyn© Installing MySQL 8.0.26 (cont.) It should already be set for the macOS, but be sure it is and then click the download button. CNT 4714: MySQL Intro – Mac Version Page 11 Dr. Mark Llewellyn© Once again, go back to the main download page and select Connectors. Click on Connector/J. CNT 4714: MySQL Intro – Mac Version Page 12 Dr. Mark Llewellyn© Download the Connector/J for use with Java applications. Select the platform independent version and download the ZIP archive. CNT 4714: MySQL Intro – Mac Version Page 13 Dr. Mark Llewellyn© Installing MySQL 8.0.26 (cont.) Double-click Click Continue CNT 4714: MySQL Intro – Mac Version Page 14 Dr. Mark Llewellyn© Installing MySQL 8.0.26 (cont.) Let it install to the default location for easiest operation.Agree to the license agreement then click Install CNT 4714: MySQL Intro – Mac Version Page 15 Dr. Mark Llewellyn© Installing MySQL 8.0.26 (cont.) 1. Choose Use Legacy Password Encryption 2. Click Next CNT 4714: MySQL Intro – Mac Version Page 16 Dr. Mark Llewellyn© Installing MySQL 8.0.26 (cont.) 1. Enter the root user password and REMEMBER it!! IT IS IMPORTANT! 2. Click Finish CNT 4714: MySQL Intro – Mac Version Page 17 Dr. Mark Llewellyn© Installing MySQL 8.0.26 (cont.) You are done! Click Close. CNT 4714: MySQL Intro – Mac Version Page 18 Dr. Mark Llewellyn© Installing MySQL Workbench 8.0 CNT 4714: MySQL Intro – Mac Version Page 19 Dr. Mark Llewellyn© MySQL Workbench 8.0.26 • Note that you will likely see an error message when you attempt to run the MySQL Workbench. The message will look like the one shown here. • Don’t panic, the solution is simple. • All Mac OS versions run on a technology called Gatekeeper. This software is designed to ensure that only trusted software runs on your Mac. • Go to System Preferencesà Security & Privacyà click “Open Anyway”. • While allowing an app to be installed manually brings protential risk, applications downloaded from trusted sites like MySQL are legit and will not harm your system. CNT 4714: MySQL Intro – Mac Version Page 20 Dr. Mark Llewellyn© A local connection will be created for the root user. Click on this instance to connect to the database server.” CNT 4714: MySQL Intro – Mac Version Page 21 Dr. Mark Llewellyn© Installing MySQL Workbench 6.3 Click on the local instance connetion, then enter your root user password in the pop-up box. Then click OK CNT 4714: MySQL Intro – Mac Version Page 22 Dr. Mark Llewellyn© CNT 4714: MySQL Intro – Mac Version Page 23 Dr. Mark Llewellyn© Installing Connector/J CNT 4714: MySQL Intro – Mac Version Page 24 Dr. Mark Llewellyn© Installing Connector/J Find your Library folder on the Mac HD. You will then drag and drop the unzipped mysql-connector-java-8.0.26 folder into the Extensions folder in the Library folder. The connector is now in your system. CNT 4714: MySQL Intro – Mac Version Page 25 Dr. Mark Llewellyn© You can check that your server is up and running by checking System Preferences. Double-check Server Is Running CNT 4714: MySQL Intro – Mac Version Page 26 Dr. Mark Llewellyn© This is the MySQL WorkBench main screen. From here you can create, use, and manage databases as well as user accounts and the server itself. CNT 4714: MySQL Intro – Mac Version Page 27 Dr. Mark Llewellyn© This is the MySQL WorkBench main screen shown with the script file available on the course website for you to play around with loaded. This script will create and populate a small database. Under File, Select Open SQL Script. Navigate to where you placed the script file and open it into this editing window. Click the lightning bolt to execute the script in the window. CNT 4714: MySQL Intro – Mac Version Page 28 Dr. Mark Llewellyn© The script executed (click the lightning bolt), which created and populated the database, then executed the query at the bottom of the script. Shown in the results window is the execution results of that query. Shown in the output window is the MySQL Server output CNT 4714: MySQL Intro – Mac Version Page 29 Dr. Mark Llewellyn© A different query executed against the same database instance. CNT 4714: MySQL Intro – Mac Version Page 30 Dr. Mark Llewellyn© Running MySQL 8.0.26 • To verify that MySQL is running properly you can check it via System Preferences (as shown on page 24), or run a MySQL client. • NOTE: The MySQL client is located at /usr/local/mysql/bin/mysql on a Mac, however, it will not add this to your path, you can do so, or do the following. Open a Terminal session and type: /usr/local/mysql/bin/mysql –u root – p You will then see the connect to the MySQL server and it will be prompting you for the root user password. See next slide. CNT 4714: MySQL Intro – Mac Version Page 31 Dr. Mark Llewellyn© Hopefully, you see this output from MySQL. The MySQL server is now awaiting a command from this client. Server version CNT 4714: MySQL Intro – Mac Version Page 32 Dr. Mark Llewellyn© Running MySQL 8.0.26 (cont.) List all databases managed by this MySQL server which are accessible to this client. Note: new installations will contain only 4 databases: information_schema, mysql, performance_schema, and test. CNT 4714: MySQL Intro – Mac Version