RedEM-RP / redem_roleplay

RedEM Roleplay Framework
https://discord.gg/nbmTmZR
Other
61 stars 51 forks source link

DB Create/Update error #10

Closed diegobh closed 4 years ago

diegobh commented 4 years ago

I got the message that my db is set manually and if i want to do it automatically i've to remove database and restart server. so idid it. Droped out redemrp database, restarted server, but it didn't create a new one =(

[ERROR] ER_BAD_DB_ERROR: Unknown data(node:14728) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead. ba(node:14728) [DEP0096] DeprecationWarning: timers.unenroll() is deprecated. Please use clearTimeout instead. se 'redemrp' [ERROR] ER_BAD_DB_ERROR: Unknown database 'redemrp' [ERROR] [MySQL] [redem_roleplay] An error happens on MySQL for query "select schema_name from information_schema.schemata where schema_name = 'redemrp'": ER_BAD_DB_ERROR: Unknown database 'redemrp' [ERROR] [MySQL] [redem_roleplay] An error happens on MySQL for query "DROP DATABASE IF EXISTSredemrp; CREATE DATABASE IF NOT EXISTSredemrp; USEredemrp`;

CREATE TABLE IF NOT EXISTS version ( id int(11) NOT NULL, current varchar(3) COLLATE utf8mb4_bin DEFAULT 'no', PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

CREATE TABLE IF NOT EXISTS characters ( identifier varchar(50) COLLATE utf8mb4_bin DEFAULT NULL, characterid int(11) DEFAULT 0, money int(11) DEFAULT 0, gold int(11) DEFAULT 0, xp int(11) DEFAULT 0, level int(11) DEFAULT 0, job varchar(50) COLLATE utf8mb4_bin DEFAULT 'unemployed', firstname varchar(50) COLLATE utf8mb4_bin DEFAULT 'first', lastname varchar(50) COLLATE utf8mb4_bin DEFAULT 'last', jobgrade int(11) DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

CREATE TABLE IF NOT EXISTS users ( identifier varchar(50) COLLATE utf8mb4_bin NOT NULL, license varchar(50) COLLATE utf8mb4_bin DEFAULT NULL, name varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, money int(11) DEFAULT NULL, bank int(11) DEFAULT NULL, permission_level int(11) DEFAULT NULL, group varchar(50) COLLATE utf8mb4_bin DEFAULT NULL, PRIMARY KEY (identifier) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; ": ER_BAD_DB_ERROR: Unknown database 'redemrp' [ERROR] [MySQL] [redem_roleplay] An error happens on MySQL for query "INSERT INTO version(id, current) VALUES(1, 'yes');": ER_BAD_DB_ERROR: Unknown database 'redemrp' [RedEM:RP] Database: Successfully created database [ERROR] [MySQL] [redem_roleplay] An error happens on MySQL for query "USE redemrp;

ALTER TABLE characters ADD COLUMN id INT NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (id);": ER_BAD_DB_ERROR: Unknown database 'redemrp' [ERROR] [MySQL] [redem_roleplay] An error happens on MySQL for query "UPDATE version SET current='no' WHERE id=1": ER_BAD_DB_ERROR: Unknown database 'redemrp' [ERROR] [MySQL] [redem_roleplay] An error happens on MySQL for query "INSERT INTO version(id, current) VALUES(2, 'yes');": ER_BAD_DB_ERROR: Unknown database 'redemrp' [RedEM:RP] Database: Successfully updated database for version: 2 [ERROR] [MySQL] [redem_roleplay] An error happens on MySQL for query "SELECT * FROM version WHERE current='yes'": ER_BAD_DB_ERROR: Unknown database 'redemrp' SCRIPT ERROR: @redem_roleplay/server/sv_db.lua:25: attempt to index a nil value (local '_version')`

i have set it up string connection to database only on server.cgf. To work the script, have i set it up on another file, please?

because it isn't... =(

thank you!!!!

ghost commented 4 years ago

u dont need to do that u just drop the tables within your current redmrp database dont drop the database 1st step Drop the tables within the redemrp database NOT THE DATABASE 2 Restart your Server 3 Magic

amakuu commented 4 years ago

/close