L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 29, 2008, 08:51:57 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > Helpful posts > Topic: MySQL n00b help.
Pages: [1]   Go Down
« previous next »
Print
Author Topic: MySQL n00b help.  (Read 6836 times)
0 Members and 1 Guest are viewing this topic.
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 391



MySQL n00b help.
« on: April 27, 2006, 04: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 09, 2006, 09:04:47 PM by Khalem » Logged
Dice
Freshman
*
Offline Offline

Posts: 6


Re: MySQL n00b help.
« Reply #1 on: April 27, 2006, 08:22:18 PM »

Awsome guide. Good work, Glarawyn. Smiley

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. Grin
Logged
Wolfbiter
BeBot Contributor
Apprentice
*******
Offline Offline

Posts: 138



WWW
Re: MySQL n00b help.
« Reply #2 on: April 28, 2006, 04:25:04 AM »

http://www.phpmyadmin.net/

It's a GUI for administrating mysql databases, and it's great.
Logged

220 Doctor | 220 Adventurer | 220 Shade
Xenixa
BeBot Contributor
Expert
*******
Offline Offline

Posts: 307



Re: MySQL n00b help.
« Reply #3 on: May 12, 2006, 04:58:19 AM »

Prefer SQLyog myself. Smiley

http://www.webyog.com/sqlyog/index_sqlyogfree.php
Logged

<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky
blofeld
Freshman
*
Offline Offline

Posts: 8


Re: MySQL n00b help.
« Reply #4 on: August 03, 2006, 06:21:46 AM »

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.
Logged
Pharexys
Apprentice
***
Offline Offline

Posts: 94


Re: MySQL n00b help.
« Reply #5 on: August 03, 2006, 08:33:08 AM »

Quote from: blofeld on August 03, 2006, 06:21:46 AM
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.
Logged
blofeld
Freshman
*
Offline Offline

Posts: 8


Re: MySQL n00b help.
« Reply #6 on: August 03, 2006, 05:45:27 PM »

Bah, told you i was dumb  Embarrassed

Added the ; on the lines and got bot running

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

Thanks for help
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > Helpful posts > Topic: MySQL n00b help.
« previous next »
 
Jump to:  

Recent
Dont get any TowerAttack ...
by Ziodberg
[Today at 06:15:35 PM]

Org Relaying
by Nytridr
[Today at 03:43:06 PM]

Auto reinvite not setting...
by Temar
[Today at 02:12:59 PM]

Link 2 Guilds via 2 Bots?
by Nytridr
[Today at 01:19:39 PM]

Question about Logon.php
by Temar
[Today at 07:17:13 AM]

MOTD module from 2.x to 4...
by Karsta
[Today at 04:14:55 AM]

Upcoming Channels
by Temar
[Today at 04:00:07 AM]

Reducing the load on a se...
by Alreadythere
[August 28, 2008, 03:29:35 PM]

Ported Modules
by krommel
[August 28, 2008, 12:01:19 PM]

Communication between gui...
by Temar
[August 27, 2008, 08:28:49 PM]
Stats
Members
Total Members: 949
Latest: pobo
Stats
Total Posts: 10356
Total Topics: 1406
Online Today: 20
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 1
Guests: 29
Total: 30
Chakki

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.37 seconds with 28 queries. (Pretty URLs adds 0.029s, 4q)
Loading...