In our support boards we aim to provide support for the B3 core in its current state. Older releases of B3 are NOT supported. Check our front page for the latest version. You may post feature requests in our General Discussion board. Modifications and Hacks of the core B3 code are NOT supported.
Before you ask for support: [ Read the Support Instructions ] - More info: [ Full Support Disclaimer ]

You are here: Big Brother Bot ForumSupport ForumsInstallation Support (Moderator: MordyT)[Solved] Connection to DB: Failed on intial Setup !!!
Pages: [1]   Go Down
  Print  
Author Topic: [Solved] Connection to DB: Failed on intial Setup !!!  (Read 1018 times) Bookmark and Share
Jr. Member
**
OS: Linux
Type: Home user
Gameservers: aiw|mw2
Posts: 11
Offline Offline
« on: November 23, 2010, 09:03:00 PM »

Hello everyone, i and a friend have been cramming our energy into getting this nice piece of software to work successfully. However we are running into an obstacle with 'MySQL" and are receiving the dreaded " Connection to DB: Failed ! " error. We are running ubuntu 10.10 and I have exhausted all the tutorials and search function help in aid this horrific error we're experiencing.

specs:
Linux OS: Ubuntu 10.10
Python 2.6
MySQL
Phpmyadmin

Any help is appreciated.....thanks ! Huh

here is the b3.xml

Code:
<?xml version='1.0'?>
<!--
 This file is generated by the B3 setup Procedure.
 If you want to regenerate this file and make sure the format is
 correct, you can invoke the setup procedure with the
 command : b3_run -s b3.xml

 This is B3 main config file (the one you specify when you run B3 with the
 command : b3_run -c b3.xml)

 For any change made in this config file, you have to restart the bot.
 Whenever you can specify a file/directory path, the following shortcuts
 can be used :
  @b3 : the folder where B3 code is installed in
  @conf : the folder containing this config file
 -->
<configuration>
<settings name="b3">
<!-- Define your game: cod/cod2/cod4/cod5/cod6/iourt41/etpro/wop/smg/bfbc2/moh -->
<set name="parser">cod6</set>
<!-- Your database info: [mysql]://[db-user]:[db-password]@[db-server[:port]]/[db-name] -->
<set name="database">[mysql://user:xxxxx@localhost/b3]</set>
<!-- Name of the bot -->
<set name="bot_name">b3</set>
<!-- Ingame messages are prefixed with this code, you can use colorcodes -->
<set name="bot_prefix">^0(^2b3^0)^7:</set>
<set name="time_format">%I:%M%p %Z %m/%d/%y</set>
<!-- The timezone your bot is in -->
<set name="time_zone">PST</set>
<!-- How much detail in the logfile: 9 = verbose, 10 = debug, 21 = bot, 22 = console -->
<set name="log_level">9</set>
<!-- Name of the logfile the bot will generate -->
<set name="logfile">b3.log</set>
</settings>
<settings name="server">
<!-- The RCON pass of your gameserver -->
<set name="rcon_password">xxxx</set>
<!-- The port the server is running on -->
<set name="port">28969</set>
<!-- The gameserver generates a logfile, put the path and name here -->
<set name="game_log">'/home/aIW-Dedicated/main/games_mp.log' </set>
<!-- The public IP your gameserver is residing on -->
<set name="public_ip">four2zero.no-ip.info</set>
<!-- The IP the bot can use to send RCON commands to (127.0.0.1 when on the same box) -->
<set name="rcon_ip">127.0.0.1</set>
<!-- Is the gameserver running PunkBuster Anticheat: on/off -->
<set name="punkbuster">off</set>
</settings>
<settings name="autodoc">
<!-- Autodoc will generate a user documentation for all B3 commands -->
<!-- by default, a html documentation is created in your conf folder -->

<!-- html, htmltable or xml -->
<set name="type">html</set>
<!-- if you want to exclude commands reserved for higher levels -->
<set name="maxlevel">100</set>
<!-- Destination can be a file or a ftp url -->
<set name="destination">/home/server_autodoc/test_doc.html</set>
</settings>
<settings name="messages">
<set name="kicked_by">%s^7 was kicked by %s^7 %s</set>
<set name="kicked">%s^7 was kicked %s</set>
<set name="banned_by">%s^7 was banned by %s^7 %s</set>
<set name="banned">%s^7 was banned %s</set>
<set name="temp_banned_by">%s^7 was temp banned by %s^7 for %s^7 %s</set>
<set name="temp_banned">%s^7 was temp banned for %s^7 %s</set>
<set name="unbanned_by">%s^7 was un-banned by %s^7 %s</set>
<set name="unbanned">%s^7 was un-banned %s</set>
</settings>
<settings name="plugins">
<set name="external_dir">'/bot/b3/extplugins'</set>
</settings>
<plugins><!-- plugin order is important. Plugins that add new in-game commands all depend on the admin plugin. Make sure to have the admin plugin before them. -->

<plugin config="&apos;/bot/b3/conf/plugin_censor.xml&apos;" name="censor" />
<plugin config="&apos;/bot/b3/conf/plugin_spamcontrol.xml&apos;" name="spamcontrol" />
<plugin config="&apos;/bot/b3/conf/plugin_admin.xml&apos;" name="admin" />
<plugin config="&apos;/bot/b3/conf/plugin_tk.xml&apos;" name="tk" />
<plugin config="&apos;/bot/b3/conf/plugin_stats.xml&apos;" name="stats" />
<plugin config="&apos;/bot/b3/conf/plugin_pingwatch.xml&apos;" name="pingwatch" />
<plugin config="&apos;/bot/b3/conf/plugin_adv.xml" name="adv" />
<plugin config="&apos;/bot/b3/conf/plugin_status.xml&apos;" name="status" />
<plugin config="&apos;/bot/b3/conf/plugin_welcome.xml&apos;" name="welcome" />
<!-- The punkbuster plugin was not installed since punkbuster is not supported or disabled. -->
<!-- The next plugins are external, 3rd party plugins and should reside in the external_dir. Example: -->
<!-- plugin config="@b3/extplugins/conf/newplugin.xml" name="newplugin" -->

<plugin config="&apos;/bot/b3/extplugins/conf/xlrstats.xml" name="xlrstats" />
<!-- You can add new/custom plugins to this list using the same form as above. -->
</plugins>
</configuration>



and output of b3.log file:

Quote
101123 20:32:03   BOT       www.bigbrotherbot.net (b3) v1.4.1 [posix] (Daniel)
101123 20:32:03   BOT       Python: 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5]
101123 20:32:03   BOT       Starting Cod6Parser v0.2 for server 127.0.0.1:28969
101123 20:32:03   BOT       --------------------------------------------
101123 20:32:03   BOT       Attempting to connect to database file://[mysql:******@Nonelocalhost/b3]...
101123 20:32:03   ERROR   Database connection failed, working in remote mode: Unknown database protocol file - [('/usr/local/lib/python2.6/dist-packages/b3-1.4.1-py2.6.egg/b3/storage.py', 207, 'connect', 'self.db = self.getConnection()'), ('/usr/local/lib/python2.6/dist-packages/b3-1.4.1-py2.6.egg/b3/storage.py', 173, 'getConnection', "raise Exception('Unknown database protocol %s' % protocol)")]
101123 20:32:03   BOT       Game log '/home/aIW-Dedicated/main/games_mp.log'
101123 20:32:03   BOT       Starting bot reading file '/home/aIW-Dedicated/main/games_mp.log'
101123 20:32:03   ERROR   Error reading file '/home/aIW-Dedicated/main/games_mp.log'
101123 20:32:03   ERROR   STDERR Error reading file '/home/aIW-Dedicated/main/games_mp.log'

101123 20:32:03   ERROR   STDERR
« Last Edit: November 23, 2010, 09:21:04 PM by four2zero » Logged

Full Member
***
OS: Linux
Type: Owner dedicated server(s)
Gameservers: UrT
Posts: 55
Offline Offline
WWW
« Reply #1 on: November 24, 2010, 01:36:27 AM »

Remove the squared brackets.
Code:
<set name="database">mysql://user:xxxxx@localhost/b3</set>
instead of
Code:
<set name="database">[mysql://user:xxxxx@localhost/b3]</set>
Logged

Tags: mysql  database  connection 
Pages: [1]   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal