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 n00b help.  (Read 115465 times)

0 Members and 1 Guest are viewing this topic.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
MySQL n00b help.
« on: April 27, 2006, 11:42:44 pm »
I may regret this at a later date, but here's a guide to help you get MySQL up and running on your Windows machine so you can run BeBot.

First, you'll need MySQL. Download the Windows Essentials package from MySQL.com. This is a MSI based installer. If it doesn't work for you, go to Microsoft Update to install the latest Windows Installer.

The installer is simple.

Phase 1: MySQL Installer
1. Click Next.
2. Select Typical, Click Next.
3. Click Install.
4. Select Skip Sign-Up, Click Next.
5. Check Configure MySQL Server Now, Click Finish.

Now you should be in the MySQL Server Instance Configuration Wizzard.

Phase 2: MySQL Server Instance Configuration Wizzard.
1. Click Next.
2. Select Detailed Configuration, Click Next.
3. Select Developer Machine, Click Next.
4. Select Multifunctional Database, Click Next.
5. Select C: and Installation Path, Click Next.
6. Select Decision Support, Click Next.
7. Check Enable TCP/IP Networking and Enable Strict Mode, Click Next.
8. Select Standard Character Set, Click Next.
9. Check Install As Windows Servers, Check Launch the MySQL Server automatically, Check Include Bin Directory in Windows PATH, Click Next.
10. Enter and confim your root password. Write down your root password and do not loose it!!! Do not check Enable root access from remote machines. Click Next.
11. Click Execute.
12. Click Finish. Reboot your computer.

At this point, you have MySQL installed and configured, but you haven't yet created a MySQL database.

Phase 3: Logging into MySQL
1. Open a command prompt. (Start > Run > CMD, Click OK)
2. In the command prompt, enter the command mysql -u root -p
3. Enter your root password (You did write it down so you wouldn't forget it right?)

You should now have a MySQL prompt that looks like: mysql>

Phase 4: Create a Database and Database User for BeBot
1. Type CREATE DATABASE databasename; (replace databasename with the name of the database you wish to create)
2. Press Enter/Return.
3. CREATE USER username@localhost; (Change username to the username you want, keep @localhost)
4. Press Enter/Return.
5. SET PASSWORD FOR username@localhost = PASSWORD('newpassword'); (Change username and newpassword to your selected username and password, again keep @localhost)
6. Press Enter/Return.
7. Type GRANT ALL on databasename.* TO username@localhost; (Again, change username, keep @localhost)
8. Press Enter/Return.
9. Type quit then Enter/Return to exit the MySQL Monitor.

Phase 5: Import items.sql to your database
IMPORTANT: This only applies for BeBot version older than 0.2.4
1. In the cmd.exe window, enter the command:
mysql -u username -p databasename < c:\bebot\items.sql
Change username and databasename to the names you selected in Phase 5. (You don't need @localhost)
2. Press Enter/Return.

Phase 6: Configure BeBot
1. Edit MySQL.conf, add the values you selected.
    $dbase = "databasename";
    $user = "username";
    $pass = "newpassword";
    $server = "localhost";
2. Edit Bot.conf following the instructions in INSTALL_GUILDBOT.txt or INSTALL_RAIDBOT.txt.
3. Run start.bat.

That's it, you're off and running.

Backing Up and Restoring your Database
It's reccomended that you backup your database. If the worst happens, you can easily recover. And the command to do so is simple:
mysqldump -u username -p --databases databasename --add-drop-table -a -f  > filename.sql

To restore a database dump:
mysql -u username -p databasename < filename.sql

Other Helpful Tools
MySQL Administrator GUI MySQL Admin Tool.
MySQL Query Browser GUI Query Tool.
MySQL Documentation The documentation, duh.
« Last Edit: June 10, 2006, 04:04:47 am by Khalem »

Offline Dice

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #1 on: April 28, 2006, 03:22:18 am »
Awsome guide. Good work, Glarawyn. :)

I just want to add that when you install MySQL on a old windows OS, like 98, MySQL cannot be run as a service, ie: the option to install it as a service is greyed out in the installer. In this case you need to run mysqld.exe from the ./bin directory manually or 'autostart' it.

...well, at least that's what I had to do. Me <- MySQL n00b too. ;D

Offline Wolfbiter

  • Contributor
  • *******
  • Posts: 149
  • Karma: +0/-0
    • KAZE
Re: MySQL n00b help.
« Reply #2 on: April 28, 2006, 11:25:04 am »
http://www.phpmyadmin.net/

It's a GUI for administrating mysql databases, and it's great.
Too many toons.

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #3 on: May 12, 2006, 11:58:19 am »
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline blofeld

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #4 on: August 03, 2006, 01:21:46 pm »
Probably me being dumb somewhere but I followed all your steps up to rebooting the computer and using the password at the command prompt.

I can type in create database *name (name can be anything) but I can never actually create a database.  Doesn't matter what I do, I've checked the Mysql folder and nothing is showing up there.

After 4 reinstalls I'm ready to pitch this and live without a bot.

Hope you can help.

Offline Pharexys

  • BeBot Apprentice
  • ***
  • Posts: 117
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #5 on: August 03, 2006, 03:33:08 pm »
Probably me being dumb somewhere but I followed all your steps up to rebooting the computer and using the password at the command prompt.

I can type in create database *name (name can be anything) but I can never actually create a database.  Doesn't matter what I do, I've checked the Mysql folder and nothing is showing up there.

After 4 reinstalls I'm ready to pitch this and live without a bot.

Hope you can help.

Here you can find a nicely guide to install php + apache + mysql, mostly mysql will interest you i guess.

http://mpcon.org/apacheguide/mysql.php

Also please remember that, you have to open mysql promt cmd from start -> all prgs -> mysql.
Then enter the password you set for root, in mysql instalation.
Then type: create database <name of database>;
(remove < and >)
note: you have to put ; at end of evry line in mysql cmd promt.

Offline blofeld

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #6 on: August 04, 2006, 12:45:27 am »
Bah, told you i was dumb  :-[

Added the ; on the lines and got bot running

Still have problems but i'll take that to different thread

Thanks for help

Offline Skidrow

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #7 on: November 19, 2009, 12:43:00 pm »
Thankyou thankyou thankyou Pharexys when i read ; i took it here it end so i never tried to add that when i tried to make the database.

Offline belatu

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #8 on: January 18, 2010, 11:13:10 pm »
the only thing i can get is this





        Your operating system is detected as 32bit

===================================================

MySQL ERROR(# 1) on query: Cannot connect to the database server at localhost as
 user belatucadros!
Se produjo un error durante el intento de conexi¾n ya que la parte conectada no
respondi¾ adecuadamente tras un periodo de tiempo, o bien se produjo un error en
 la conexi¾n establecida ya que el host conectado no ha podido responder.
-----------------------------------------------------------------------------

o please help me!!  :o :o :o :o :o

what can i do ??? ???

Offline belatu

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #9 on: January 19, 2010, 03:48:10 pm »
another error :( :( :( :( :( :(

         v.0.6.6 - PHP 5.3.1

                 OS: Windows_NT

        Your operating system is detected as 32bit

===================================================

MySQL ERROR(# 1) on query: Cannot connect to the database server at localhost as
 user belatucadros!
Access denied for user 'belatucadros'@'localhost' (using password: YES)

Offline belatu

  • BeBot Rookie
  • *
  • Posts: 7
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #10 on: January 19, 2010, 05:06:27 pm »
it seems that it was a problem of ; missess ; ; ; ;

anyway the servers are down

i will try later


Offline Arawacian

  • BeBot Rookie
  • *
  • Posts: 13
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #11 on: March 07, 2010, 02:00:44 pm »
Think I found the solution to an issue on windows 7, I am not completely noob, but I almost broke my skull over the fact that I couldnt get the bot started . It had the famous standard problem connecting to MYsql
Code: [Select]
MySQL ERROR(# 1) on query: Cannot connect to the database server at localhost as
 user xxxxxxxx!
Access denied for user 'xxxxxxxxxx'@'localhost' (using password: YES)
So thinking i made a mistake in either DB creation or user addition I checked.... and checked... and uninstalled.... reinstalled... and checked and still not working...

AT work now i realize and found additional evidence that in windows 7 the line for 127.0.0.1 localhost is not included in your hosts file anymore...

Gonna check when I get home if this was the issue.

uncommenting the 127.0.0.1 localhost line in the hosts file resolves the issue for win 7
« Last Edit: March 07, 2010, 10:30:17 pm by Arawacian »

Offline dragonjr

  • BeBot Apprentice
  • ***
  • Posts: 131
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #12 on: October 05, 2010, 01:18:24 am »
would i have to make that change for vista?

Offline TBK

  • BeBot User
  • **
  • Posts: 26
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #13 on: October 05, 2010, 11:28:54 pm »
would i have to make that change for vista?

Windows key + R, type "%windir%\system32\drivers\etc\hosts", open the file in notepad

Then uncomment the two lines, so you end up with the same result as displayed below.
Code: [Select]
# localhost name resolution is handled within DNS itself.
127.0.0.1       localhost
::1             localhost

Offline Killaah

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: MySQL n00b help.
« Reply #14 on: November 11, 2010, 12:56:33 am »
Hi guys,

Just trying to setup bebot for my guild in AOC. Everything appears to be fine but im stuck on this error.

[10-Nov-2010 23:15:41] PHP Warning:  mysql_connect(): [2002] A connection attempt failed because the connected party did not  (trying to connect via tcp://localhost:3306) in C:\guildbot\Sources\MySQL.php on line 129
[10-Nov-2010 23:15:41] PHP Warning:  mysql_connect(): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
 in C:\guildbot\Sources\MySQL.php on line 129

ANy suggestions?

Cheers in advance

 

* 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: 146
  • 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