Raised This Month: $106 Target: $400
 26% 

Vault to MySQL Saving Via Windows Steps.


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 01-06-2006 , 21: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 [email protected];

    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 [email protected] 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 03:34.
yang is offline
Send a message via AIM to yang
123
Veteran Member
Join Date: Apr 2005
Location: Katy, TX
Old 01-07-2006 , 10:45   Re: Vault to MySQL Saving Via Windows Steps.
#2

Quote:
Originally Posted by yang
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.
It is way easier to add it via phpMyAdmin
Simply select the sql file under the menu SQL.

And your guide can only be used if the mysql database is located on the same pc as the server.
And actually the server creates the databases that is needed, if the connection is right.
__________________
//ShadowLeader - 123
123 is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 01-07-2006 , 14:40  
#3

actually... if i'm not mistaken, you can simply telnet to remote server and type the almost exact command to run it on a remote unix server if i'm not mistaken o.O.... so Imma gonna have to argue that you can use this guide even for unix setup. Except for C:\shero.sql it would probably be somethign like /home/user/username/shero.sql assuming you put the shero.sql in the username folder. Also btw, I don't like phpAdmin, I have it installed. I tried both but I find myself going to the command more often than not since not every server use phpmyadmin so I think commands are more versatile.
__________________
yang is offline
Send a message via AIM to yang
123
Veteran Member
Join Date: Apr 2005
Location: Katy, TX
Old 01-07-2006 , 14:41  
#4

If you only have a webhotel on a remote computer, you do not have root access...
Then it can't be used.
__________________
//ShadowLeader - 123
123 is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 01-07-2006 , 14:43  
#5

i'm pretty sure when a webhost gives u a mySQL server they give a user access on their mySQL DB no?
__________________
yang is offline
Send a message via AIM to yang
123
Veteran Member
Join Date: Apr 2005
Location: Katy, TX
Old 01-07-2006 , 14:46  
#6

Mostly you only get access via phpMyAdmin.
You have only one database, and you are not allowed to create any more.
__________________
//ShadowLeader - 123
123 is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 01-07-2006 , 14:49  
#7

so then I would just use that database for shero saving no? Just remove the create database part from the shero db install script. Just start from:

USE SHERODB; << or whatever the database name is o.O... cannot be done?
__________________
yang is offline
Send a message via AIM to yang
DFG
Member
Join Date: Jan 2006
Old 03-03-2006 , 06:46  
#8

cant make anything whit dos
doesnt work i says cnat find the file specified
__________________
bla bla bla
DFG is offline
RealAdmin
Junior Member
Join Date: Mar 2006
Old 03-18-2006 , 17:45  
#9

hi.

i have a quick Q if i may, the last command, does that take the xp out of the vault and put it into the DB ?

i wish to move from vault to mysql, but dont know how to import the xp across, am i right in assuming this will take care of that for me?

thankyou
RealAdmin is offline
123
Veteran Member
Join Date: Apr 2005
Location: Katy, TX
Old 03-18-2006 , 21:37  
#10

Quote:
Originally Posted by SuperHero Mod Commands
amx_shvaulttosql - Command to copy vault into mysql. Run it once to convert to the XP in the vault to mysql database. Run it ONLY ONCE. This command is only available if you are using the plugin compiled for mysql saving. Table Schema is in superheromodmysql.inc, you must build the tables first. If you're smart enough to run mysql I'm sure you're smart enough make the tables.
__________________
//ShadowLeader - 123
123 is offline
Closed Thread


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:26.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode