Creating eAthena and ROCP Databases

Create databases

Follow Creating MySQL database and create the following empty databases:
  • ragnarok
  • log (skip this if you do not use log)
  • cp (for ROCP)
If you have not done so, create those databases before continuing with this guide.

Finishing

Log in as root

qb-011: Logging in to Query Browser
Launch Query Browser. And log in, of course.


Default schema

qb-10: Default schema is not defined
If you see a notice, you can ignore it or define the default database you want to work with after logging in.


Populate ragnarok database

qb-11: Opening script file
Note: Query Browser is fuzzy about the terms query and script. A .sql file is referred to as a script.

Highlight required database in the Schemata pane.

Go to menu, select File, followed by Open Script.


qb-051: Selecting a query script
Select main.sql from Athena sql-files folder


qb-15: Opening script file
The main.sql script is shown here.


qb-16: Executing script file
Click Execute button to run the query script.

Or go to menu, select Script, followed by Execute


Create optional tables

Repeat the previous steps but executing mob_db.sql and item_db.sql if you intend to use sql mob_db and item_db respectively.

Create administrative user

qb-14: Running own script file
Create an admin user (GM99) by executing query script, i.e. paste your script into the script pane (shown with a script to promote a player to GM99), select Script and Execute from menu to execute or click Execute button.
INSERT INTO login (account_id, userid, user_pass, sex, email, level) VALUES (704561, 'myname', 'mypass', 'F', 'me@localhost', 99);


An alternative

qb-12: The query method
The alternative (query) method: Paste your script into the query pane and select Queryand Execute from menu to execute.

Query results are shown in the Resultset pane.


Export results

qb-13: Exporting query results
If you want to export those query results, select File, Export Resultset and choose the desired format to export.


Populate log:

Go to menu, select File, then Open Script. Next select logs.sql from Athena sql-files folder.
Select Script and Execute to execute the query script.

Populate cp:

Go to menu, select File, then Open Script. Next select install.sql from ROCP install/Athena & Freya folder.
Select Script and Execute to execute the query script.