AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Tech Support (https://forums.alliedmods.net/forumdisplay.php?f=36)
-   -   Vault to MySQL Saving Via Windows Steps. (https://forums.alliedmods.net/showthread.php?t=35432)

yang 01-06-2006 20:52

Vault to MySQL Saving Via Windows Steps.
 
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.

123 01-07-2006 09:45

Re: Vault to MySQL Saving Via Windows Steps.
 
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.

yang 01-07-2006 13:40

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. :P

123 01-07-2006 13:41

If you only have a webhotel on a remote computer, you do not have root access...
Then it can't be used.

yang 01-07-2006 13:43

i'm pretty sure when a webhost gives u a mySQL server they give a user access on their mySQL DB no?

123 01-07-2006 13:46

Mostly you only get access via phpMyAdmin.
You have only one database, and you are not allowed to create any more.

yang 01-07-2006 13:49

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?

DFG 03-03-2006 05:46

cant make anything whit dos
doesnt work i says cnat find the file specified

RealAdmin 03-18-2006 16:45

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

123 03-18-2006 20:37

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.


Veyron 03-23-2006 15:59

awww what did i do wrong

Code:

[superheromodmysql.amxx] DEBUG: MySQL connect error: 'Can't connect to MySQL server on 'localhost' (10061)' (localhost,SuperHeroModUser,sherodb)
i believe i did steps 6-8 wrong

Quote:

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

7, Go into your mysql/bin folder

8, Type "mysql -uroot -ppassword < C:\shero.sql"
ummm when i open Dos Command, what do u mean by going into my mysql folder?
where do i type "mysql -uroot -password < C:\shero.sql"
whats uroot stand for? and i didnt put a password, so do i even put that - alone?

123 03-23-2006 17:00

Did you even install mysql ???

Veyron 03-23-2006 17:45

umm i was able to do everything else
i got the contrib folder
and i changed all those changes from vault to mysql and enabled to module

so i might not even have it??


after i checked here to, which doesnt have those steps 6-8
http://sh-mod.mfhosting.com/viewtopic.php?t=7

123 03-24-2006 06:51

Both guides require that you have pre-installed mysql.
www.mysql.com

Veyron 03-27-2006 13:31

i installed mysql but am still getting the same error message

DFG 03-27-2006 14:11

get PHPMYADMIN its more easier
xampplite easyphp has them
i did it whit phpmyadmin and it works fine no dos no nothing

jtp10181 03-27-2006 21:01

If you don't know how to use mysql or want to attempt to learn how then don't use it. Why do you need mysql saving anyway?

Veyron 03-28-2006 10:11

because on my server i have 55 levels, but every map change it resets my hero selection to 43/55, so i have to repick heros, so the answer ive heard is that my vault is maxed out at 43, and mysql and can hold the full 55, or if i want to raise it higher.

DFG 03-28-2006 10:19

vault can hold my 63 lvl (never got an eror)
no problem

Veyron 03-28-2006 12:26

im not getting any error messages, its just that the hero selection is reseting to 43/55 for me every map change...i dont understand why its not holding it.......

DFG 03-29-2006 09:59

hmmm i dont realy know
(im still using vault but moving to mySQL)

123 03-29-2006 10:07

Don't do it, if you do not know how to.

RealAdmin 04-26-2006 19:19

Hi, currently we are using the vault to store xp.

Every few weeks we get loads of people complaining that their xp has been reset to 0, which it has.

Am i correct to assume that this is caused by some physical limitation of the vault/hero mod saving to vault, and would this be fixed by resorting to a mysql db or am i talkin $h!%

vittu 04-26-2006 19:44

Shconfig.cfg (default setting shown below):
Code:

//How many days XP is saved after a users last connection
//Recommended max setting of 30 for VAULT style saving. Max value is 365.
sh_xpsavedays 14

If they don't play for 14 days their xp gets reset.

If you have a real problem this is not the place to post it, and please read the forums rules when posting in tech support so that you can supply us with the info needed to help you. And please do not reply to this.

#Reaper 08-23-2006 06:50

Re: Vault to MySQL Saving Via Windows Steps.
 
Hi, i would like to transfer the vault data to the MySQL Database. But i cant download the .sql which is linked in the first post.
Can someone help me please?
Thanks!

lumbsta 08-23-2006 07:57

Re: Vault to MySQL Saving Via Windows Steps.
 
I trasfered the vault data to my databse without using any .sql-dump! Just use that command from 1st post to transfer the data!

#Reaper 08-23-2006 08:34

Re: Vault to MySQL Saving Via Windows Steps.
 
OK! Thanks, it's going!
:)

lumbsta 08-23-2006 15:18

Re: Vault to MySQL Saving Via Windows Steps.
 
Good to hear that :)

BTW: Did you decrease my karma?

Edit: Sry, just found out that someone else decreased my karma...although I helped him Oo

Cladyu 12-16-2006 11:28

Re: Vault to MySQL Saving Via Windows Steps.
 
Do I have to BUY mysql form www.mysql.com? Or is there a link I didn't see? If it is, plz post it to me...:mrgreen:

Emp` 12-16-2006 19:48

Re: Vault to MySQL Saving Via Windows Steps.
 
You can prolly get mysql from somewhere else, I use the mysql that comes with wamp5

yang 12-17-2006 02:35

Re: Vault to MySQL Saving Via Windows Steps.
 
you can get it at mysql.com for free -.- I updated the link for you ppl who are ______ .

vittu 12-17-2006 02:37

Re: Vault to MySQL Saving Via Windows Steps.
 
I think 4 is recommended over 5 - http://dev.mysql.com/downloads/mysql/4.1.html

Not positive though...

SizZzl0r 12-22-2006 15:34

Re: Vault to MySQL Saving Via Windows Steps.
 
I'm using MySQL 5 and it works fine...

NetroN 02-18-2007 09:26

Re: Vault to MySQL Saving Via Windows Steps.
 
I haven't got a shero_mysql_install.sql in my package.
installer_SuperHero.exe<- i dowinstaller_SuperHero.exeloaded this file from this web-site :(

yang 02-18-2007 17:54

Re: Vault to MySQL Saving Via Windows Steps.
 
http://forums.alliedmods.net/showthread.php?t=31012

willcordeiro 11-10-2007 14:03

Re: Vault to MySQL Saving Via Windows Steps.
 
Hi, I am having problems with the mysql.
My English is not very good but I will try to speak xD

I did everything as the tutorial, but when I put the command amx_shvaulttosql the server returns an error:


L 11/12/2007 - 16:58:43: [superheromodmysql.amxx] DEBUG: MySQL connect error: 'Access denied for user' SuperHeroModUser '@' localhost '(using password: NO)' (localhost, SuperHeroModUser, sherodb)

If someone help me achieve am very grateful!

Alexel 03-03-2008 13:59

Re: Vault to MySQL Saving Via Windows Steps.
 
Hi,i'm new on alliedmods and my english is very bad!

My eror is....

Code:

[superheromodmysql.amxx] DEBUG: MySQL connect error: 'Access denied for user 'ODBC'@'localhost' (using password: NO)' (,,)
[superheromodmysql.amxx] DEBUG: MySQL connect error: 'Access denied for user 'ODBC'@'localhost' (using password: NO)' (,,)

how i change "ODBC'@'localhost" in "localhost@localhost"

Thanks!

yang 03-03-2008 14:07

Re: Vault to MySQL Saving Via Windows Steps.
 
are u hosting the mysql database on the same computer as the server?

and did u put a password on the mysql databaes?

Alexel 03-04-2008 07:31

Re: Vault to MySQL Saving Via Windows Steps.
 
yes...i hosting the mysql db on my computer,and i put a password in my mysql...

Drush 03-29-2008 12:43

Re: Vault to MySQL Saving Via Windows Steps.
 
i can't download the "contribution package"...the link in the describtion is wrong....:cry:


All times are GMT -4. The time now is 04:37.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.