-
Notifications
You must be signed in to change notification settings - Fork 41
Database setup
angelxuanchang edited this page Sep 25, 2024
·
10 revisions
So far, we have used MySQL 5.7.
- Following MySQL installation to installing MySQL for your platform. Alternatively, you can also use MariaDB
Ubuntu 14.04, 16.04, 18.04
sudo apt install mysql-server
sudo mysql_secure_installation
MacOS
To install mysql:
brew install mysql
Alternative, to install mariadb:
brew install mariadb
- Setup an account with username/password and database that you will use for the annotations (substitute appropriate name for
dbname
,username
andpassword
. The default inserver/config/index.js
(seeconfig.annDb
) usesstk
for all three. Updating them to be something more unique is recommended.
sudo mysql -u root -p
mysql> CREATE DATABASE dbname;
mysql> CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT ALL PRIVILEGES ON dbname.* TO 'username'@'localhost';
- Start
mysql
as the new user
mysql -u username -p dbname
- Run
scripts/db/create_annotation_tables.sql
to create tables for annotation
# run the script in the mysql prompt
mysql> source scripts/db/create_annotation_tables.sql
- Adjust configuration for your MySQL instance in
server/config/index.js
(seeconfig.annDb
)
mysqldump -u [username] -p --databases [database] > [database]_20190506.sql
Specific tables
mysqldump [database] [t1] [t2] [t3] > dump.sql
Restore
mysql < dump.sql
- Home
- Main
- Annotators
- Assets
- Batch processing
- Development
- File formats
- Rendering
- Scene Tools
- Voxels