BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.2 support => Topic started by: Gwitz on December 24, 2005, 09:07:28 am

Title: Setting up MySql
Post by: Gwitz on December 24, 2005, 09:07:28 am
Ok, so im new to guild/raidbots and php and mysql...but so far i think i have everything, im getting the "Can't connect to MySql server on 'Localhost' " error, and im sure i just dont have the mysql database setup properly.

So..iv been trying all sorta of stuff iv been seering by searching old posts...but i just cant get the comands to work the in my sql command window...so im sure im doing something wrong :\

Title: Re: Setting up MySql
Post by: Gwitz on December 24, 2005, 09:22:43 am
Also like to add...windows machine, mysql and everything is on the same machine
Title: Re: Setting up MySql
Post by: Khalem on December 24, 2005, 02:59:31 pm
I'm planning to write up a Windows guide, but until then i have never even installed MySQL on windows, so I'm afraid i cant be of too much help.

However i can recommend a windows MySQL administration tool that i use extensively to administrate my own MySQL databases, regardless of what OS the database is run on.
It should make things easier for those that can't quite find their way around the command line tools.
http://www.webyog.com/sqlyog/index_sqlyogfree.php
Title: Re: Setting up MySql
Post by: Xenixa on December 24, 2005, 10:42:48 pm
Couple things with Security settings on Windows machines you will need to check wi MySQL.

First to make it easier to adjust Security settings get the MySQL Administrator program from the MySQL website if you havn't already. Once it's all installed and you're connected to the Server using the root account goto "Startup Variables" On the Security Tab the ONLY box on that tab that should be checked on is the "Disable Grant Tables".

Double check to make sure "Use Old Passwords" is not checked on. That will give you headaches from hell if your running off a Windows server.

Hope all that helps.
Title: Re: Setting up MySql
Post by: Gwitz on December 25, 2005, 04:01:38 am
Well, iv obviously got soemthing setup wrong in the mysql install or something, cuz the admin tool u suggested gives a similar error as the bebot prompt. Can't connect to MYsql server on localhost. Im possitive i have the password correct cuz its the same one i use to logon the mysql command line.
Title: Re: Setting up MySql
Post by: Alreadythere on December 25, 2005, 02:18:46 pm
Got any local firewall running?
If yes, are local processes allowed to open connections to MySQL?
Title: Re: Setting up MySql
Post by: skeezix on December 25, 2005, 06:15:12 pm
I would imagine the most common error when setting up MySQL is the firewall is killing access to itself.   If you're running on XP/2003 go to the firewall settings and add either the executable for MySQL that is running, or add the specific port you're running MySQL on.

If it's an authentication error I would imagine it would say, otherwise I'm assuming a firewall issue :)
Title: Re: Setting up MySql
Post by: Gwitz on December 26, 2005, 02:13:08 am
Well i got mysql working, i reckon the first time i installed mysql i tried to use a different password from the sign in part...so anyways i deleted the entire mysql folder and ya it works now. But now im getting authentication error from bebot. My friend says it has somethin to do with the php.ini file.
Title: Re: Setting up MySql
Post by: Khalem on December 26, 2005, 03:08:52 pm
This will be what you're looking for:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html

The mysql library that comes with your php is most likely a 4.0 version which means it doesn't understand the new password format in MySQL 4.1 and newer.
That webpage details the ways to get around it.
Title: Re: Setting up MySql
Post by: Gwitz on January 15, 2006, 11:25:18 am
A friend sent me a bebot install with php and everything already in it, and it works. cool bot all in all, now i gota learn php so i can start doin customizing. I also read the mysql tutorial on editing the database, very cool stuff so far.

First thing that stands out to me is that i have to make members superadmin in order for them to be able to take !leader in the raidbot. Also, anyone can use the !loot and !result functions.

if anyone knows of a good php tutorial it would be much appreciated

Title: Re: Setting up MySql
Post by: Xenixa on January 15, 2006, 04:08:33 pm
Tutortial eh? Well no better place to start than the source of all that is PHP.

http://us2.php.net/manual/en/index.php There's a Tutorial in the Manual with lots of links to other sources.

How I learned anyway. :) Well actually I started by looking at code samples that listed what they do. What I did was to look at them and deconstruct them function by function and then read up on the PHP commands in the Manual used in those functions. BeBot's code is a good way to learn actually. It actually uses a very small set of PHP's commands. Narrow enough to give you a good foundation on how the PHP parser operates I think.
Title: Re: Setting up MySql
Post by: Balneator on February 12, 2006, 02:22:07 pm
Having similar problems myself probably due to being generally clueless on what to type in where, when i run bebot i get "call to undefined function mysql_connect() in c:\*bebot folder*\mysql.php, also same as gwitz can't get the SQLyog thing to connect or the SQL setup thing  ???  ???  ???  ::)
Title: Re: Setting up MySql
Post by: MatHack on February 12, 2006, 03:59:24 pm
That sounds like a misconfigured PHP, means it can't find the mysql_connect() function, which is located in the mysql-extension.
Title: Re: Setting up MySql
Post by: Balneator on February 12, 2006, 05:09:58 pm
yeah i was completely unsure of what to type into the $dbase $user $pass and $server into the MySQL.conf and then tried the SQLyog thing, just not sure what i'm doing really, i first found out mySQL existed yesterday...still not entirely sure what it does  :P
Title: Re: Setting up MySql
Post by: Balneator on February 13, 2006, 12:36:57 am
ok poked around a bit more, understand what i'm trying to do now but the values i'm using appear to be wrong according to that error atm i have
<?
    $dbase = "raidbot";
    $user = "<username>";
    $pass = "<password>";
    $server = "%Localhost";
?>
does that seem correct?
Title: Re: Setting up MySql
Post by: MatHack on February 13, 2006, 01:07:20 am
$server = "localhost";
Title: Re: Setting up MySql
Post by: Balneator on February 13, 2006, 11:16:08 am
ok removed the % and it still throws me the same error, i just can't see where it's going wrong  ???
Title: Re: Setting up MySql
Post by: Balneator on February 13, 2006, 12:07:01 pm
ok completely ripped out the entire thing and started again this time on php4 at first i got the same error as Gwitz, seemed to get past that by setting up the user permissions in SQLyog, but now i get "client does not support authentication protocol requested by server" any ideas?  ???

edit: using the files posted by xenixa here: ftp://xen.afraid.org/bebot_files/bebot-php441.zip (http://ftp://xen.afraid.org/bebot_files/bebot-php441.zip)
Title: Re: Setting up MySql
Post by: Alreadythere on February 13, 2006, 12:39:29 pm
This will be what you're looking for:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html

The mysql library that comes with your php is most likely a 4.0 version which means it doesn't understand the new password format in MySQL 4.1 and newer.
That webpage details the ways to get around it.

Check the link out, it should be what you need for that error.
Title: Re: Setting up MySql
Post by: Balneator on February 13, 2006, 02:53:56 pm
yep sorry i missed that, blinkers on  ;D now i have the same problem as listed here: http://bebot.link/index.php/topic,33.0.html (http://bebot.link/index.php/topic,33.0.html) but i'm on windows so the aokex thing doesn't work for me :/

edit: using the updated AOchat-1171
Title: Re: Setting up MySql
Post by: Xenixa on February 13, 2006, 08:53:18 pm
If you're using PHP4 and that AOChat.php 1.17.1 you should most definatley not be getting any AOKex error. That extention isn't even referenced in 1.17.1. Sounds like you may have the newer copy from Auno installed some where in the bots path and the bot is trying to use it.

Basic Files that should be in the Bots root folder(don't confuse root with the root of the drive):

php.exe
php4ts.dll
php_bz2.dll
php_sockets.dll
php.ini
AOChat.php
Bot.php
main.php
MySQL.php
start.php

Make sure no copies of those files exsist in any of the folders under the Bots root folder.
BTW php4ts.dll isn't really needed on NT rigs but I leave it anyway. Actually I have it commented from loading in my php.ini file.
Title: Re: Setting up MySql
Post by: Balneator on February 13, 2006, 09:19:42 pm
it loads all the modules etc and then i get "Aochat: not expecting login" all the files seem fine all there no copies
Title: Re: Setting up MySql
Post by: Balneator on February 13, 2006, 10:49:02 pm
strange thing is in notepad the formatting in aochat seems very strange, large block of scrambled text. Seems to open ok in wordpad thoough  ???
Title: Re: Setting up MySql
Post by: Balneator on February 14, 2006, 12:37:52 am
fixed the formatting and double checked the log in details etc and still nothing seems to befuddle everyone i talk to about it too :/
Title: Re: Setting up MySql
Post by: Khalem on February 14, 2006, 04:29:11 am
Please try the following php files in place of the ones you have now:
http://svn.shadow-realm.org:7100/svn/BeBot/trunk/php.exe
http://svn.shadow-realm.org:7100/svn/BeBot/trunk/php4ts.dll

Title: Re: Setting up MySql
Post by: Balneator on February 14, 2006, 11:43:43 am
Thanks that fixed it for me
Title: Re: Setting up MySql
Post by: eracet1 on March 30, 2006, 05:17:39 pm
I have been trying to get Bebot 0.2.3 to run.
I try Start.bat and seems to have problems getting connected to Mysql.
I installed normal SQL, and also tried Administrator.
When trying ot connect to MySql Server Instance on the Administrator it says  cannot connect.
Using settings
ServerHost : Localhost Port 3306

Is this what I want to use?
And is Username and Password an AO one?

Please help me with this.

Title: Re: Setting up MySql
Post by: buff on March 31, 2006, 06:22:50 am
you will need to install MySQL server and it can be download from website free.
go google it and u will have the server version one to download
once you install MySQL 5 server it will ask you to configure instance and setup password for it
the default user name for it will be root and password will be whatever you put it
that user name and password will be what you wanna use in MySQL.conf for ur bebot.
SimplePortal 2.3.7 © 2008-2025, SimplePortal