View Single Post
Author Message
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 01-06-2006 , 20:52   Vault to MySQL Saving Via Windows Steps.
#1

Steps to switch vault xp saving to SQL saving in windows!!

MySQL is a database program. So if you wish to use it, download at http://dev.mysql.com/downloads/mysql/5.0.html#downloads and install it.

The following steps are to install mySQL on your local server WINDOWS ONLY, but it can also applied to command steps if you know how to command connect to mySQL via remote linux etc:


1, Download the contribution package:

2, Extract it, and you will need this file from the package:
  • shero_mysql_install.sql

3, Name it a easier name if you want, say shero.sql

4, Open it with a text editor program.
  • Notice this part of the code:

    CREATE DATABASE IF NOT EXISTS SHeroDB;
    USE SHeroDB;
    GRANT SELECT ON `SHeroDB`.* TO SuperHeroModUser@localhost;

    Here "SHeroDB" is the database name.
    The user is SuperHeroModUser Restricted to: localhost

    I prefer to have a password on it. So I switched it to:

    GRANT SELECT ON `SHeroDB`.* TO SuperHeroModUser@localhost IDENTIFIED BY 'password';

    Close & Save.

5, Put it into C: drive.

6, Open DOS Command ( Start -> Run -> type "cmd" )

7, Go into your mysql/bin folder

8, Type "mysql -uroot -ppassword < C:\shero.sql"
  • This will automatically create a superhero database for you.

9, Go into your dedicated server folder then -> /addons/amxmodx/configs/modules.ini
  • Find:

    ; -------------------------------------------
    ; Database Access - only enable one of these
    ; -------------------------------------------
    ; MySQL
    ;mysql_amxx_i386.so
    ;mysql_amxx.dll
    ;mysql_amxx_amd64.so

    Change it to:

    ; -------------------------------------------
    ; Database Access - only enable one of these
    ; -------------------------------------------
    ; MySQL
    mysql_amxx_i386.so
    mysql_amxx.dll
    mysql_amxx_amd64.so

    Now you have mysql module enabled.
10, Open /addons/amxmodx/configs/plugins.ini
  • Change:

    //To save XP to the VAULT file (default)
    superheromodvault.amxx

    To:
    //To save XP to the VAULT file (default)
    //superheromodvault.amxx
    superheromodmysql.amxx

    This will enable the interaction between superhero mod and mysql module.

11, Open /addons/amxmodx/configs/shero/shconfig.cfg and edit accordingly:
  • Find:

    // *** MySQL Settings, Only Needed if using the mysql saving method ***
    // Uncomment the cvar lines to enable these settings

    sh_mysql_host "localhost" << if locally saved, leave it be.
    sh_mysql_user "SuperHeroModUser" << We already set this in step 4
    sh_mysql_pass "" << If we added password in step 4, type it here, otherwise leave it blank.
    sh_mysql_db "sherodb" << The database name we created in step 4.
    sh_mysql_persistent 0

12, Close and ReOpen Server.

13, Join server, open console. Type: amx_shvaulttosql << TYPE IT ONLY ONCE!! Don't know why
but if vittu and jtp says so it gotta be right. So there ya go. You have now successfully installed mySQL xp saving.
__________________

Last edited by yang; 12-17-2006 at 02:34.
yang is offline
Send a message via AIM to yang