Deploying the Database - welikepie/asos-hangout-app GitHub Wiki
We need to create a database on the server so we can fill it with ASOS products that we will later scrape from the ASOS website. This database will be what we are searching through in the Admin Panel of the ASOS Hangout Application, to add specific products into the right hand side of the Application Landing Page and thus Main ASOS Hangout, for viewers to see. In order to deploy the database, you must have mysql installed on your server.
The database we need can be created using the “optimised-db-structure.sql” mysql script in the utilScraper/databases folder of the ASOS Hangout App Repository. To use this script you must upload it to the server and then run it from the command line by accessing mysql and running it. To do this you must run the “mysql” command with “--user=[username]” appended to login with your specific username and “--pass=[password]” appending to log in with your specific password.
The command will look something like the following:
mysql --user=[username] --pass=[password]
Once you’ve logged in, to run the script you’ll need to execute the following command: source [fullfilepath to .sql script]/optimised-db-structure.sql
For example:
source asoshangout/utilScraper/optimised-db-structure.sql
If you prefer not to create the database in this way, it is possible to use tools like MySQL Workbench to log into the your mySQL database server and then running the script through that. If there are any errors, these will need to be rectified by editing the sql creation script, re uploading the file and then re-running the script.
If everything went well and no errors occurred, you’ve created your database!