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

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

Author Topic: Mysql and PHP config for Bebot  (Read 2126 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
Mysql and PHP config for Bebot
« on: August 17, 2009, 11:32:33 pm »
Thought I would cross post this here from aodevs.com.

Ok, here is a simple guide to help you out in getting Bebot up and running.

First you need to get a copy of MySQL running on the computer that will be hosting your bot.

http://dev.mysql.com/downloads/mysql/5.1.html#downloads

Install the server software and make sure that you configure it after installing. Choose a password for the root account that is easy to remember but note, this is not going to be the password that you use in the config file for Bebot. Also be sure to set the MySQL instance as a Service so that it will start with each reboot of your computer (if using windows).

Once that is installed download the GUI tools to easily manipulate the database.

http://dev.mysql.com/downloads/gui-tools/5.0.html

Install the GUI tools and run the MySQL System Tray Monitor to add an icon in the system tray of your desktop. Right click the tray icon and choose MySQL Administrator.

Server Host: Localhost
Username: root
Password: <your root password>

Once you are logged in you will want to do two things, first create a Schema (Database) and second a user to log into the schema. First create the schema by clicking on the Catalogs option on the left. In the box on the bottom left (under the schema search box) right click and choose Create New Schema.

Name this Schema what you want. For this example I am going to use Bebot as the name.

Once the schema is created go to User Administration and click the Add New User button, fill out the information on the page. For this example I will use bebotuser as the username and bebotpass as the password. Make sure to apply changes then while the bebotuser is selected as the active user, click on the Schema Privileges tab. Find the Schema and click it to list what sort of control this user will have over that database. To make things easy just click the "double carat" button ("<<") to add all permissions to that user. Click apply changes and then close the MySQL Administrator.

Next you need to get the right version of PHP and configure the PHP.ini file to work with bebot. I have found that PHP 5.2.5 has the least amount of problems out of the box when working with Bebot.

http://www.php.net/releases/
http://museum.php.net/php5/php-5.2.5-Win32.zip

Download and extract the PHP zip file and extract it to the same directory that you are going to keep Bebot in. For this example that would be c:\bebot that I am using.

Once the files are extracted find the c:\bebot\php.ini file and open it. We need to change the location of php extensions. This file will be named php.ini-dist at first so you will need to rename it to php.ini for if you cant find it. Look through the file till you find the line as follows:
Code: [Select]
; Directory in which the loadable extensions (modules) reside.
extension_dir = "./"
Change this to read
Code: [Select]
; Directory in which the loadable extensions (modules) reside.
extension_dir = "./php_extension/"

Once this is done, you can save and close the php.ini file.

Now, you get to configure your bot to work.

Open up the folder in your bot directory called conf and find two files. These files may need to be renamed from bot.conf.TEMPLATE to bot.conf and mysql.conf.TEMPLATE to mysql.conf.

Open up bot.conf and enter in the required information. Check the bebot forums for more info on where to get info and how to fill out the file.

Open up mysql.conf and get the username/password/database info that we filled out in the above section. Find the following area.
Code: [Select]
/*
Database name
*/
$dbase = "";
/*
Database username
*/
$user = "";
/*
Database password
*/
$pass = "";
/*
Database server (usually localhost)
*/
$server = "";

Fill it out to reflect the mysql login info
Code: [Select]
/*
Database name
*/
$dbase = "bebot";
/*
Database username
*/
$user = "bebotuser";
/*
Database password
*/
$pass = "bebotpass";
/*
Database server (usually localhost)
*/
$server = "localhost";

Save and close the file and go back to the c:\bebot directory.

Run startbot.bat and with any luck you now have a running version of bebot. It will take time to create the tables and populate it with info the first time you run the bot so sit back, relax, have a Dr. Pepper and enjoy your new bot.

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


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 ]

* Who's Online
  • Dot Guests: 290
  • 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