Need install MySQL here:
https://dev.mysql.com/downloads/mysql/
and the workbench here:
https://dev.mysql.com/downloads/workbench/
https://stackoverflow.com/questions/6474775/setting-the-mysql-root-user-password-on-os-x
You only get one opportunity to see the default root password. If you miss that, you have to reset the password manually.
- Stop the MySQL server from running by going to "System Preference" then "MySQL" and hitting "Stop MySQL Server"
- Open a new console terminal and run
sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
. This will start the MySQL database server running again in safe mode. - Open a second console and connect to the database with
sudo /usr/local/mysql/bin/mysql -u root
. This will ask you for a password which is the adminstrator password for your machine - In the database prompt enter
USE mysql;
thenUPDATE mysql.user SET authentication_string=PASSWORD("YOUR PASSWORD") WHERE User='root';
being careful to replace your own new password
https://stackoverflow.com/questions/5515745/create-a-new-database-with-mysql-workbench
Use the Flask app above to connect to the test database you created and pull out data. Bear in mind that in my test database I only has one "name" column in the database. Your script will be different depending on how you set up your database.