AlliedModders

mySQL Saving


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Duffnexter
Member
Karma: Neutral
Old 11-05-2009 , 05:08   mySQL Saving
Reply With Quote #1

Quote:
If you are using the mysql saving method you will want to import the shero_mysql_install.sql script (in contrib folder) into your database.
i use sql that i got with my web host can someone help me how do i edit this file (simply put Ur Host Here, Ur Userv Here...) thank you... and just simply tell me how to import it here is the pic of my sql options
Quote:
# Created by...: Kevin tkm@gamersource.net
# Description..: SuperHeroMod MySQL Install Script
# Orig Date....: 08/01/03
# Modified Date: 08/01/03
#
# Reference: Linux: See MySQL_README_LINUX - SECTION 2.0
# Windows: See MySQL_README_WINDOWS - SECTION 2.0
#

# Start: Create the databases
CREATE DATABASE IF NOT EXISTS SHeroDB;
USE SHeroDB;
GRANT SELECT ON `SHeroDB`.* TO SuperHeroModUser@localhost;


#----------------------------------------------------
# Start: Create the tables
#----------------------------------------------------

CREATE TABLE IF NOT EXISTS `sh_savexp` (
`SH_KEY` varchar(34) binary NOT NULL default '',
`PLAYER_NAME` varchar(32) binary NOT NULL default '',
`LAST_PLAY_DATE` timestamp(14) NOT NULL,
`XP` int(10) unsigned NOT NULL default '0',
`HUDHELP` tinyint(1) unsigned NOT NULL default '1',
`SKILL_COUNT` int(3) unsigned NOT NULL default '0',
PRIMARY KEY (`SH_KEY`)
) TYPE=MyISAM COMMENT='SUPERHERO XP Saving Table';

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER ON `sh_savexp` TO SuperHeroModUser@localhost;

CREATE TABLE IF NOT EXISTS `sh_saveskills` (
`SH_KEY` varchar(34) binary NOT NULL default '',
`SKILL_NUMBER` int(10) unsigned NOT NULL default '0',
`HERO_NAME` varchar(25) NOT NULL default '',
PRIMARY KEY (`SH_KEY`,`SKILL_NUMBER`)
) TYPE=MyISAM COMMENT='SUPERHERO Skill Saving Table';

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER ON `sh_saveskills` TO SuperHeroModUser@localhost;

FLUSH PRIVILEGES;

#----------------------------------------------------
# Stop
#----------------------------------------------------
2. Where do i put file called superhero that is placed in "contrib" folder?
__________________

Duffnexter is offline
Send a message via MSN to Duffnexter Send a message via Skype™ to Duffnexter
vittu
SuperHero Moderator
Karma: Good
Location: L.A. County, CA
Old 11-05-2009 , 14:30   Re: mySQL Saving
Reply With Quote #2

As long as you set the cvars correctly in shconfig.cfg:
Code:
// *** MySQL Settings, Only needed if using the mysql saving method ***
// Uncomment the cvar lines to enable these settings

//sh_mysql_host "localhost"
//sh_mysql_user "SuperHeroModUser"
//sh_mysql_pass ""
//sh_mysql_db "sherodb"
//sh_mysql_persistent 0
your tables will be automatically be created the first time you run superheromodmysql.amxx.
__________________


vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Duffnexter
Member
Karma: Neutral
Old 11-05-2009 , 18:54   Re: mySQL Saving
Reply With Quote #3

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

//sh_mysql_host "localhost"
//sh_mysql_user "SuperHeroModUser"
//sh_mysql_pass ""
//sh_mysql_db "sherodb"
//sh_mysql_persistent 0
Are You Tring To Help Or Make It More Coplicated?
Quote:
sh_mysql_host "localhost"
sh_mysql_user "SuperHeroModUser"
sh_mysql_pass ""
sh_mysql_db "sherodb"
sh_mysql_persistent 0
i did it this way and it didnt work
1. it says Your exp will be given next round and it doesnt and those are the errors i get in logs:
Attached Files
File Type: txt logs.txt (14.6 KB, 5 views)
__________________


Last edited by Duffnexter; 11-05-2009 at 19:12..
Duffnexter is offline
Send a message via MSN to Duffnexter Send a message via Skype™ to Duffnexter
vittu
SuperHero Moderator
Karma: Good
Location: L.A. County, CA
Old 11-05-2009 , 19:56   Re: mySQL Saving
Reply With Quote #4

If you don't know what your host, user, and password are you shouldn't be trying to use mysql.
__________________


vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
Duffnexter
Member
Karma: Neutral
Old 11-05-2009 , 21:47   Re: mySQL Saving
Reply With Quote #5

i know what my host is user and pass. if u have read what i wrote in first post than u kno what im talkin about
__________________

Duffnexter is offline
Send a message via MSN to Duffnexter Send a message via Skype™ to Duffnexter
Jelle
Senior Member
Karma: Neutral
Location: Denmark
Old 11-06-2009 , 14:18   Re: mySQL Saving
Reply With Quote #6

Quote:
Originally Posted by Duffnexter View Post
sh_mysql_host "localhost"
sh_mysql_user "SuperHeroModUser"
sh_mysql_pass ""
sh_mysql_db "sherodb"
sh_mysql_persistent 0
Now, I am not so familiar to mysql. But what I think it should be, is like this:

Code:
sh_mysql_host "localhost" //Write your host here
sh_mysql_user "SuperHeroModUser" //Write your username here
sh_mysql_pass "" //write your password here
sh_mysql_db "sherodb"
sh_mysql_persistent 0
And as vittu said, all files will be placed the first time.
__________________
Jelle is offline
Send a message via MSN to Jelle
Duffnexter
Member
Karma: Neutral
Old 11-07-2009 , 13:04   Re: mySQL Saving
Reply With Quote #7

well i kno that... i did it before even posting here, it doesnt work like in my first post it tells what i need....
__________________

Duffnexter is offline
Send a message via MSN to Duffnexter Send a message via Skype™ to Duffnexter
Reply


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 20:04.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Theme made by Freecode Sponsored by Layered Technologies