jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm

ds = com.mysql.jdbc.jdbc2.optional.MysqlDataSource
ds.serverName = localhost
ds.user = yourusername
ds.password = yourpassword
ds.databaseName = nameOfYourDatabase
jdbcRealm.dataSource= $ds

jdbcRealm.authenticationQuery = SELECT password from user where username = ?
#jdbcRealm.userRolesQuery = select role from userroles where userID =
(select id FROM user WHERE username = ?)



--
View this message in context: 
http://shiro-user.582556.n2.nabble.com/How-to-set-up-a-MySQL-instance-as-an-external-data-source-in-Shiro-tp7579547p7579549.html
Sent from the Shiro User mailing list archive at Nabble.com.

Reply via email to