BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.4 support => Topic started by: Slacklin on October 08, 2007, 12:18:45 am

Title: Cannot create database tables.
Post by: Slacklin on October 08, 2007, 12:18:45 am
When I tried to configure the bot for the first time I keep getting errors about MySQL Database errors. Not sure if anybody else has received the same problem and any help would be appreciated.

Code: [Select]
Connected to MySQL
MySQL error (# 0) on query: CREATE TABLE IF NOT EXISTS ucom_security_org
            (org_gov VARCHAR(255) NOT NULL,
            org_rank VARCHAR(255) NOT NULL,
            org_rank_id TINYINT UNSIGNED NOT NULL,
            access_level TINYINT UNSIGNED NOT NULL DEFAULT 2,
            PRIMARY KEY (org_gov, org_rank, org_rank_id))

Specified key was too long. Max key length is 500
MySQL error (# 1) on query: INSERT IGNORE INTO ucom_security_org (org_gov, org_r
ank, org_rank_id) VALUES ('Department', 'President', 0), ('Department', 'General
', 1), ('Department', 'Squad Commander', 2), ('Department', 'Unit Commander', 3)
, ('Department', 'Unit Leader', 4), ('Department', 'Unit Member', 5), ('Departme
nt', 'Applicant', 6), ('Faction', 'Director', 0), ('Faction', 'Board Member', 1)
, ('Faction', 'Executive', 2), ('Faction', 'Member', 3), ('Faction', 'Applicant'
, 4), ('Republic', 'President', 0), ('Republic', 'Advisor', 1), ('Republic', 'Ve
teran', 2), ('Republic', 'Member', 3), ('Republic', 'Applicant', 4), ('Monarchy'
, 'Monarch', 0), ('Monarchy', 'Consil', 1), ('Monarchy', 'Follower', 2), ('Feuda
lism', 'Lord', 0), ('Feudalism', 'Knight', 1), ('Feudalism', 'Vassal', 2), ('Feu
dalism', 'Peasant', 3), ('Anarchism', 'Anarchist', 1)
Table 'bebot.ucom_security_org' doesn't exist

ucom [2007-10-07 22:10:45]      [CORE]  [LOAD]  Security.php
MySQL error (# 2) on query: CREATE TABLE IF NOT EXISTS ucom_settings
              (module varchar(255) NOT NULL,
               setting varchar(255) NOT NULL,
               value varchar(255) NOT NULL,
               datatype varchar(255) DEFAULT NULL,
               longdesc varchar(255) DEFAULT NULL,
               defaultoptions varchar(255) DEFAULT NULL,
               hidden BOOLEAN DEFAULT 0,
               disporder INT UNSIGNED NOT NULL DEFAULT 1,
               PRIMARY KEY (module, setting))
You have an error in your SQL syntax.  Check the manual that corresponds to your
 MySQL server version for the right syntax to use near 'BOOLEAN DEFAULT 0,
               disporder INT UNSIGNED NOT
MySQL error (# 3) on query: SELECT value FROM ucom_settings WHERE module = 'Sett
ings' AND setting = 'SchemaVersion'
Table 'bebot.ucom_settings' doesn't exist
MySQL error (# 4) on query: SELECT value FROM ucom_settings WHERE module = 'Sett
ings' AND setting = 'Schemaversion'
Table 'bebot.ucom_settings' doesn't exist
ucom [2007-10-07 22:10:45]      [SETTINGS]      [ERROR] Could not determine vers
ion of the settings table. Quitting.
The bot has been shutdown
Title: Re: Cannot create database tables.
Post by: Alreadythere on October 08, 2007, 11:54:49 am
I think the first error is due to a different character set you are using, that needs more then one byte per character.

The second error looks like it got trouble with the boolean type, though that should be available...
Title: Re: Cannot create database tables.
Post by: Trancillion on October 08, 2007, 12:22:05 pm
Looks like the error I had. My problem was that i had space in the place the SQL was. Like: "D:\MySQL Server", removed the space with a _ (D:\mysql_server) and then it could create the database without problems.

Might solve the problem
Title: Re: Cannot create database tables.
Post by: Temar on October 08, 2007, 11:55:09 pm
What Server Version?
Title: Re: Cannot create database tables.
Post by: Slacklin on October 09, 2007, 06:26:15 am
MySQL 4.0.23-nt is the version that I am using. For all the remainder, I am using the downloadable content only to launch Bebot.
Title: Re: Cannot create database tables.
Post by: Alreadythere on October 09, 2007, 10:46:27 am
Pretty sure that several SQL commands require at least MySQL 4.1.
Title: Re: Cannot create database tables.
Post by: Glarawyn on October 09, 2007, 08:02:40 pm
Pretty sure that several SQL commands require at least MySQL 4.1.

This is correct. The error he is getting is also consistent with MySQL using UTF8 character set. ENGINE=MyISAM DEFAULT CHARSET=latin1;

You'll have to open up the Security.php and Settings.php core modules and modify the SQL commands to append DEFAULT CHARSET=latin1...


For example:
CREATE TABLE IF NOT EXISTS #____security_org
            (org_gov VARCHAR(255) NOT NULL,
            org_rank VARCHAR(255) NOT NULL,
            org_rank_id TINYINT UNSIGNED NOT NULL,
            access_level TINYINT UNSIGNED NOT NULL DEFAULT 2,
            PRIMARY KEY (org_gov, org_rank, org_rank_id)) DEFAULT CHARSET=latin1;

That should correct the "Specified key was too long. Max key length is 500" error. As for the boolean error, I tested on MySQL 4.1 and 5.0  and didn't run into it. Check your MySQL version. As mentioned earlier, BeBot does need MySQL 4.1 or greater.
SimplePortal 2.3.7 © 2008-2025, SimplePortal