This is a pretty cool db visualization tool. It lets you visualize a db. Yup.
- Install the latest version of Node (at the time of writing, 7.4.0).
- Clone the repo with git.
- Navigate to the repo folder and run
npm install
- Once that finishes, run
node index.js
- The console should show a message that it is listening on port 3000, go to http://localhost:3000/ and verify that you can see the test page.
Note, to run app on a different port, add a command line argument for the port you want. For instance, node index.js 80
would run the app on port 80.
-
Ensure that MySQL is installed and functional on your local machine (the mechanism for this differs by OS).
-
Create a new superuser - it's not a good practice to routinely use
root
as a user.
mysql -uroot -p;
CREATE USER 'seng371'@'localhost' IDENTIFIED BY 'seng_pass';
GRANT ALL PRIVILEGES ON *.* TO 'seng371'@'localhost' WITH GRANT OPTION;
exit;
-
Download and extract database information
cd /tmp
wget https://github.com/datacharmer/test_db/archive/master.zip;
unzip master.zip;
-
Create and populate the sample MySQL employees database:
cd test_db-master/
mysql -useng371 -pseng_pass -t < ./employees.sql
-
Verify data integrity
time mysql -useng371 -pseng_pass -t < ./test_employees_sha.sql
time mysql -useng371 -pseng_pass -t < ./test_employees_md5.sql
-
Start the node app in the cloned repository
# (cd back to the folder...)
node index.js
-
Open your browser to http://localhost:3000/ and verify that you can use the tool. Try making a new project using the following values:
Project Name: <any name you choose>
Database Host IP: localhost
Port: 3306
Username: seng371
Password: seng_pass
Database: employees
If everything is set up properly you should be able to view that project without issues.
The employees database has the following schema (note, this is not generated with this tool, but was provided by the creators of the database):