· 6 years ago · May 09, 2019, 09:26 PM
1[SQL] Query altislife start
2[ERR] 1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
3[ERR] SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
4SET time_zone = "+00:00";
5--
6-- Compatible with newer MySQL versions. (After MySQL-5.5)
7-- This SQL uses utf8mb4 and has CURRENT_TIMESTAMP function.
8--
9
10
11/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
12/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
13/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
14/*!40101 SET NAMES utf8mb4 */;
15
16--
17-- Database: `altislife`
18-- Default Schema
19--
20
21--
22-- Drop procedures to ensure no conflicts
23--
24DROP PROCEDURE IF EXISTS `resetLifeVehicles`;
25DROP PROCEDURE IF EXISTS `deleteDeadVehicles`;
26DROP PROCEDURE IF EXISTS `deleteOldHouses`;
27DROP PROCEDURE IF EXISTS `deleteOldGangs`;
28DROP PROCEDURE IF EXISTS `deleteOldContainers`;
29DROP PROCEDURE IF EXISTS `deleteOldWanted`;--
30-- Procedures
31-- Edit arma3 to match a user in MySQL
32-- For external databases: Edit localhost to match arma3server IP
33--
34
35CREATE DEFINER=`root`@`145.239.108.64 ` PROCEDURE `resetLifeVehicles`()
36BEGIN
37 UPDATE `vehicles` SET `active`= 0;
38END;
39
40CREATE DEFINER=`root`@`145.239.108.64 ` PROCEDURE `deleteDeadVehicles`()
41BEGIN
42 DELETE FROM `vehicles` WHERE `alive` = 0;
43END;
44
45CREATE DEFINER=`root`@`145.239.108.64 ` PROCEDURE `deleteOldHouses`()
46BEGIN
47 DELETE FROM `houses` WHERE `owned` = 0;
48END;
49
50CREATE DEFINER=`root`@`145.239.108.64 ` PROCEDURE `deleteOldGangs`()
51BEGIN
52 DELETE FROM `gangs` WHERE `active` = 0;
53END;
54
55CREATE DEFINER=`root`@`145.239.108.64 ` PROCEDURE `deleteOldContainers`()
56BEGIN
57 DELETE FROM `containers` WHERE `owned` = 0;
58END;
59
60CREATE DEFINER=`root`@`145.239.108.64 ` PROCEDURE `deleteOldWanted`()
61BEGIN
62 DELETE FROM `wanted` WHERE `active` = 0;
63END;
64-- --------------------------------------------------------
65
66--
67-- Table structure for table `players`
68--
69
70CREATE TABLE IF NOT EXISTS `players` (
71 `uid` int(6) NOT NULL AUTO_INCREMENT,
72 `name` varchar(32) NOT NULL,
73 `aliases` text NOT NULL,
74 `pid` varchar(17) NOT NULL,
75 `cash` int(100) NOT NULL DEFAULT '0',
76 `bankacc` int(100) NOT NULL DEFAULT '0',
77 `coplevel` enum('0','1','2','3','4','5','6','7') NOT NULL DEFAULT '0',
78 `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
79 `civ_licenses` text NOT NULL,
80 `cop_licenses` text NOT NULL,
81 `med_licenses` text NOT NULL,
82 `civ_gear` text NOT NULL,
83 `cop_gear` text NOT NULL,
84 `med_gear` text NOT NULL,
85 `civ_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"',
86 `cop_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"',
87 `med_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"',
88 `arrested` tinyint(1) NOT NULL DEFAULT '0',
89 `adminlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
90 `donorlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
91 `blacklist` tinyint(1) NOT NULL DEFAULT '0',
92 `civ_alive` tinyint(1) NOT NULL DEFAULT '0',
93 `civ_position` varchar(64) NOT NULL DEFAULT '"[]"',
94 `playtime` varchar(32) NOT NULL DEFAULT '"[0,0,0]"',
95 `insert_time` timestamp DEFAULT CURRENT_TIMESTAMP,
96 `last_seen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
97 PRIMARY KEY (`uid`),
98 UNIQUE KEY `pid` (`pid`),
99 KEY `name` (`name`),
100 KEY `blacklist` (`blacklist`)
101) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=12 ;
102
103-- --------------------------------------------------------
104
105--
106-- Table structure for table `vehicles`
107--
108
109CREATE TABLE IF NOT EXISTS `vehicles` (
110 `id` int(6) NOT NULL AUTO_INCREMENT,
111 `side` varchar(16) NOT NULL,
112 `classname` varchar(64) NOT NULL,
113 `type` varchar(16) NOT NULL,
114 `pid` varchar(17) NOT NULL,
115 `alive` tinyint(1) NOT NULL DEFAULT '1',
116 `blacklist` tinyint(1) NOT NULL DEFAULT '0',
117 `active` tinyint(1) NOT NULL DEFAULT '0',
118 `plate` int(20) NOT NULL,
119 `color` int(20) NOT NULL,
120 `inventory` text NOT NULL,
121 `gear` text NOT NULL,
122 `fuel` double NOT NULL DEFAULT '1',
123 `damage` varchar(256) NOT NULL,
124 `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
125 PRIMARY KEY (`id`),
126 KEY `side` (`side`),
127 KEY `pid` (`pid`),
128 KEY `type` (`type`)
129) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=2 ;
130
131-- -------------------------
132[SQL] Finished with error