Hello, i need help, i’m install oxmysql and ox_core and i get this error in console and i can’t join in to server.
Hello, i need help, i’m install oxmysql and ox_core and i get this error in console and i can’t join in to server.
Hi,
I coulr be wrong but looks like you havent added them to your database, so its trying to find it and can’t find it, so thats why you’re receiving this error
SQL is good.
Post a screenshot of your database?
overextended
USE overextended
;
CREATE TABLE IF NOT EXISTS users
(
userid
int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
username
varchar(50) DEFAULT NULL,
license
varchar(50) DEFAULT NULL,
steam
varchar(20) DEFAULT NULL,
fivem
varchar(10) DEFAULT NULL,
discord
varchar(20) DEFAULT NULL,
PRIMARY KEY (userid
) USING BTREE
) ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS characters
(
charid
int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
userid
int(11) UNSIGNED NOT NULL,
firstname
varchar(50) NOT NULL,
lastname
varchar(50) NOT NULL,
gender
varchar(50) NOT NULL,
dateofbirth
date NOT NULL,
phone_number
varchar(20) DEFAULT NULL,
last_played
date NOT NULL DEFAULT curdate(),
is_dead
tinyint(1) NOT NULL DEFAULT 0,
x
float DEFAULT NULL,
y
float DEFAULT NULL,
z
float DEFAULT NULL,
heading
float DEFAULT NULL,
inventory
longtext NOT NULL DEFAULT ‘’,
metadata
JSON DEFAULT ‘{}’ CHECK (JSON_VALID(metadata
)),
deleted
DATE NULL DEFAULT NULL,
PRIMARY KEY (charid
) USING BTREE,
KEY FK_character_users
(userid
) USING BTREE,
CONSTRAINT FK_characters_users
FOREIGN KEY (userid
) REFERENCES users
(userid
) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS ox_groups
(
name
VARCHAR(20) NOT NULL,
label
VARCHAR(50) NOT NULL,
grades
LONGTEXT NOT NULL,
hasAccount
TINYINT(1) NOT NULL DEFAULT ‘0’,
PRIMARY KEY (name
) USING BTREE
) ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS user_groups
(
charid
int(11) UNSIGNED NOT NULL,
name
varchar(50) NOT NULL,
grade
int(11) NOT NULL,
UNIQUE KEY name
(name
, charid
) USING BTREE,
KEY FK_user_groups_characters
(charid
) USING BTREE,
CONSTRAINT FK_user_groups_characters
FOREIGN KEY (charid
) REFERENCES characters
(charid
) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS ox_inventory
(
owner
varchar(60) DEFAULT NULL,
name
varchar(60) NOT NULL,
data
longtext DEFAULT NULL,
lastupdated
timestamp NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP(),
UNIQUE KEY owner
(owner
, name
)
) ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS vehicles
(
id
INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
plate
CHAR(8) NOT NULL DEFAULT ‘’,
owner
INT(11) UNSIGNED NULL DEFAULT NULL,
group
varchar(50) NULL DEFAULT NULL,
model
VARCHAR(20) NOT NULL,
class
TINYINT(1) NULL DEFAULT NULL,
data
LONGTEXT NOT NULL,
trunk
LONGTEXT NULL DEFAULT NULL,
glovebox
LONGTEXT NULL DEFAULT NULL,
stored
VARCHAR(50) NULL DEFAULT NULL,
PRIMARY KEY (id
) USING BTREE,
UNIQUE INDEX plate
(plate
) USING BTREE,
INDEX FK_vehicles_characters
(owner
) USING BTREE,
CONSTRAINT FK_vehicles_characters
FOREIGN KEY (owner
) REFERENCES overextended
.characters
(charid
) ON UPDATE CASCADE ON DELETE CASCADE,
CONSTRAINT FK_vehicles_groups
FOREIGN KEY (group
) REFERENCES overextended
.ox_groups
(name
) ON UPDATE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB;
THIS IS OX_CORE sql