diff options
author | tangpeng <tang.peng5@zte.com.cn> | 2017-02-27 14:23:22 +0800 |
---|---|---|
committer | tangpeng <tang.peng5@zte.com.cn> | 2017-02-27 14:45:09 +0800 |
commit | 11ca44c2132eb2ce12d3e36789b04896bf518149 (patch) | |
tree | 78144fbf83b554d06db46c9fb8a4a95eef736aa9 /engine-d-standalone/src/main/assembly/dbscripts | |
parent | a83d08161f34b503fbb9275418b0e828a6d219eb (diff) |
Add holmes sql script
Change-Id: I707d410fe4f1389f8002a4526f53d15484125377
Issue-Id:HOLMES-47
Signed-off-by: tangpeng <tang.peng5@zte.com.cn>
Diffstat (limited to 'engine-d-standalone/src/main/assembly/dbscripts')
-rw-r--r-- | engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql b/engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql index 4f5294a..73d51ee 100644 --- a/engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql +++ b/engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql @@ -13,5 +13,48 @@ -- See the License for the specific language governing permissions and
-- limitations under the License.
--
+/******************drop old database and user***************************/
+use mysql;
+drop database IF EXISTS holmes;
+delete from user where User='holmes';
+FLUSH PRIVILEGES;
+/******************create new database and user***************************/
+create database holmes CHARACTER SET utf8;
+
+GRANT ALL PRIVILEGES ON holmes.* TO 'holmes'@'%' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON mysql.* TO 'holmes'@'%' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+
+GRANT ALL PRIVILEGES ON catalog.* TO 'holmes'@'localhost' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON mysql.* TO 'holmes'@'localhost' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+FLUSH PRIVILEGES;
+
+use holmes;
+set Names 'utf8';
+/******************delete old table and create new***************************/
+use holmes;
+DROP TABLE IF EXISTS aplus_rule;
+CREATE TABLE aplus_rule (
+ rid varchar(30) NOT NULL,
+ name varchar(150) CHARACTER NOT NULL,
+ description varchar(4000) CHARACTER SET DEFAULT NULL,
+ enable int(1) NOT NULL,
+ templateID int(10) NOT NULL,
+ engineID varchar(20) CHARACTER NOT NULL,
+ engineType varchar(20) CHARACTER NOT NULL,
+ creator varchar(20) CHARACTER NOT NULL,
+ createTime datetime NOT NULL,
+ updator varchar(20) CHARACTER DEFAULT NULL,
+ updateTime datetime DEFAULT NULL,
+ params varchar(4000) CHARACTER DEFAULT NULL,
+ content varchar(4000) CHARACTER NOT NULL,
+ vendor varchar(100) CHARACTER NOT NULL,
+ package varchar(255) DEFAULT NULL,
+ PRIMARY KEY (rid),
+ UNIQUE KEY name (name),
+ KEY IDX_APLUS_RULE_ENABLE (enable),
+ KEY IDX_APLUS_RULE_TEMPLATEID (templateID),
+ KEY IDX_APLUS_RULE_ENGINEID (engineID),
+ KEY IDX_APLUS_RULE_ENGINETYPE (engineType)
+)
|