...
Code Block | ||
---|---|---|
| ||
mysql -uswiftriver -p swiftriver < /opt/swiftriver/src/SwiftRiver-API/src/main/resources/config/sql/schema.sql |
After the schema is created, run the queries below to add some required basic information to the database.
Code Block | ||
---|---|---|
| ||
INSERT INTO `swiftriver`.`clients`
VALUES
('1', '1', 'trusted-client', '8b22f281afd911c3dfc59270af43db1995d5968a3447c780ba3e152e603fd9a0', 'http://localhost:8080/oauth/redirect', 'my app', 'my app\'s description', 'my app\'s homepage', '1');
INSERT INTO `swiftriver`.`roles_clients`
VALUES
(1,3),(1,4);
INSERT INTO `swiftriver`.`roles` (`id`,`name`,`description`)
VALUES
(1, 'user', 'Login privileges, granted after account confirmation'),
(2, 'admin', 'Super Administrator'),
(3, 'client', 'Client application'),
(4, 'trusted_client', 'Truested client application');
INSERT INTO `swiftriver`.`accounts`
VALUES
('1', '1', 'default', '0', '2013-01-01 00:00:00', '2013-01-02 00:00:00', '1', '10', '1');
INSERT INTO `swiftriver`.`users`
VALUES
('1', 'myswiftriver@myswiftriver.com', 'Administrator', 'admin', '$2a$05$f0I9XjamKm4LEaF8av1Zy.tzBrzFM0smLMKvMAqUWicGAcEnkCdQe', '0', '1', '10', '2014-03-08 13:21:15', '2013-01-01 00:00:00', '0', '0'); |
Tomcat, Java and JDBC
If your application fails to start later on, it might be because it's not connecting to the MySQL database. To solve that, you'll need to make sure that the JDBC driver is installed on Tomcat.
...