89 | | mysql> source /path/to/create_rubycas_mysql_db.sql[[BR]] |
90 | | The SQL file should look like this:[[BR]] |
91 | | {{{ |
92 | | -- MySQL dump 10.13 Distrib 5.1.52, for unknown-linux-gnu (x86_64) |
93 | | -- |
94 | | -- Host: localhost Database: casserver |
95 | | -- ------------------------------------------------------ |
96 | | -- Server version 5.1.52 |
97 | | |
98 | | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; |
99 | | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
100 | | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; |
101 | | /*!40101 SET NAMES utf8 */; |
102 | | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; |
103 | | /*!40103 SET TIME_ZONE='+00:00' */; |
104 | | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; |
105 | | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; |
106 | | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; |
107 | | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; |
108 | | |
109 | | -- |
110 | | -- Table structure for table `casserver_lt` |
111 | | -- |
112 | | |
113 | | DROP TABLE IF EXISTS `casserver_lt`; |
114 | | /*!40101 SET @saved_cs_client = @@character_set_client */; |
115 | | /*!40101 SET character_set_client = utf8 */; |
116 | | CREATE TABLE `casserver_lt` ( |
117 | | `id` int(11) NOT NULL AUTO_INCREMENT, |
118 | | `ticket` varchar(255) NOT NULL, |
119 | | `created_on` datetime NOT NULL, |
120 | | `consumed` datetime DEFAULT NULL, |
121 | | `client_hostname` varchar(255) NOT NULL, |
122 | | PRIMARY KEY (`id`) |
123 | | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; |
124 | | /*!40101 SET character_set_client = @saved_cs_client */; |
125 | | |
126 | | -- |
127 | | -- Table structure for table `casserver_pgt` |
128 | | -- |
129 | | |
130 | | DROP TABLE IF EXISTS `casserver_pgt`; |
131 | | /*!40101 SET @saved_cs_client = @@character_set_client */; |
132 | | /*!40101 SET character_set_client = utf8 */; |
133 | | CREATE TABLE `casserver_pgt` ( |
134 | | `id` int(11) NOT NULL AUTO_INCREMENT, |
135 | | `ticket` varchar(255) NOT NULL, |
136 | | `created_on` datetime NOT NULL, |
137 | | `client_hostname` varchar(255) NOT NULL, |
138 | | `iou` varchar(255) NOT NULL, |
139 | | `service_ticket_id` int(11) NOT NULL, |
140 | | PRIMARY KEY (`id`) |
141 | | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
142 | | /*!40101 SET character_set_client = @saved_cs_client */; |
143 | | |
144 | | -- |
145 | | -- Table structure for table `casserver_st` |
146 | | -- |
147 | | |
148 | | DROP TABLE IF EXISTS `casserver_st`; |
149 | | /*!40101 SET @saved_cs_client = @@character_set_client */; |
150 | | /*!40101 SET character_set_client = utf8 */; |
151 | | CREATE TABLE `casserver_st` ( |
152 | | `id` int(11) NOT NULL AUTO_INCREMENT, |
153 | | `ticket` varchar(255) NOT NULL, |
154 | | `service` text NOT NULL, |
155 | | `created_on` datetime NOT NULL, |
156 | | `consumed` datetime DEFAULT NULL, |
157 | | `client_hostname` varchar(255) NOT NULL, |
158 | | `username` varchar(255) NOT NULL, |
159 | | `type` varchar(255) NOT NULL, |
160 | | `granted_by_pgt_id` int(11) DEFAULT NULL, |
161 | | `granted_by_tgt_id` int(11) DEFAULT NULL, |
162 | | PRIMARY KEY (`id`) |
163 | | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
164 | | /*!40101 SET character_set_client = @saved_cs_client */; |
165 | | |
166 | | -- |
167 | | -- Table structure for table `casserver_tgt` |
168 | | -- |
169 | | |
170 | | DROP TABLE IF EXISTS `casserver_tgt`; |
171 | | /*!40101 SET @saved_cs_client = @@character_set_client */; |
172 | | /*!40101 SET character_set_client = utf8 */; |
173 | | CREATE TABLE `casserver_tgt` ( |
174 | | `id` int(11) NOT NULL AUTO_INCREMENT, |
175 | | `ticket` varchar(255) NOT NULL, |
176 | | `created_on` datetime NOT NULL, |
177 | | `client_hostname` varchar(255) NOT NULL, |
178 | | `username` varchar(255) NOT NULL, |
179 | | `extra_attributes` text, |
180 | | PRIMARY KEY (`id`) |
181 | | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
182 | | /*!40101 SET character_set_client = @saved_cs_client */; |
183 | | |
184 | | -- |
185 | | -- Table structure for table `schema_migrations` |
186 | | -- |
187 | | |
188 | | DROP TABLE IF EXISTS `schema_migrations`; |
189 | | /*!40101 SET @saved_cs_client = @@character_set_client */; |
190 | | /*!40101 SET character_set_client = utf8 */; |
191 | | CREATE TABLE `schema_migrations` ( |
192 | | `version` varchar(255) NOT NULL, |
193 | | UNIQUE KEY `unique_schema_migrations` (`version`) |
194 | | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
195 | | /*!40101 SET character_set_client = @saved_cs_client */; |
196 | | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
197 | | |
198 | | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
199 | | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
200 | | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; |
201 | | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; |
202 | | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; |
203 | | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
204 | | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; |
205 | | |
206 | | -- Dump completed on 2011-10-27 9:53:58 |
207 | | }}} |
| 75 | mysql> source /etc/rubycas-server/create_rubycas_mysql_db.sql[[BR]] |