collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Cannot create database tables.  (Read 3097 times)

0 Members and 1 Guest are viewing this topic.

Offline Slacklin

  • BeBot User
  • **
  • Posts: 52
  • Karma: +0/-0
  • My spoon is too big!
    • United Org Site
Cannot create database tables.
« 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

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Cannot create database tables.
« Reply #1 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...

Offline Trancillion

  • BeBot User
  • **
  • Posts: 20
  • Karma: +0/-0
Re: Cannot create database tables.
« Reply #2 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

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: Cannot create database tables.
« Reply #3 on: October 08, 2007, 11:55:09 pm »
What Server Version?

Offline Slacklin

  • BeBot User
  • **
  • Posts: 52
  • Karma: +0/-0
  • My spoon is too big!
    • United Org Site
Re: Cannot create database tables.
« Reply #4 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.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Cannot create database tables.
« Reply #5 on: October 09, 2007, 10:46:27 am »
Pretty sure that several SQL commands require at least MySQL 4.1.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Cannot create database tables.
« Reply #6 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.

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 389
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal