im having problems making / using my mysql data base, im using sqlite and have no idea what to do
i realy want my own charts, any help?
World Charts, HELP - need help
This topic is 15 years and 1 week old. Instead of replying, please begin a new topic, or search for another related topic that may be more suitable.
My dad works with it every day. I might be able to get him to write something for you.
Edit: He works with mySQL, a very similiar thing...
Edit: He works with mySQL, a very similiar thing...
Last edited by arfn24 on Thu Jul 10, 2008 6:15 pm, edited 1 time in total.
not a robot
- raph666
- Administrator
- Posts: 2426
- Joined: March 9th, 2007
- Location: dans la mer du nord
- Reputation: 20
- Contact:
Topic title says "World charts", I never set up the django "world" charts so I can only help with the php+mysql charts (this solution works with most hosting) so if you're interested in the django charts only, ignore this reply.
Anyway, you might have stated what is your problem but it lacks a bit of details about what you did exactly, in order to know where you are "stuck". No details require longer answers so:
To run charts you need:
- webserver / hosting that allow creation of mysql databases.
- an empty mysql database (if you're using a webhosting, you can usually create db in control panels)
After, read the readmes. there are scripts that will help you setting up your database by creating tables and populating the db.
you can notice these are python scripts so you need python installed on your computer.
the scripts also need the python mysql module, find it here: http://sourceforge.net/projects/mysql-python
to use the scripts, you need to be able to access your mysql host remotely (as opposed to your php scripts that usually connect locally with "localhost"). the remote access host is the host you want to use in " buildDatabase.py -init "host" "user" "passwd" "db" " (notice the -init flag, that you use to create the tables in your db)
if you do not have remote access to your database, use the provided mysql manager (like phpmyadmin). find a "sql" tab where you can execute queries and use the instructions written in the scripts
and
After that you need to add songs to your songs table. Run the builddatabase script without the -init flag in your songs folder. If you can't remotely connect to the mysql db, simply dump the songs queries in a file with the -f <filename> flag. With a client like phpmyadmin you can easily import text files in mysql. After that you're pretty much done with the mysql part
Anyway, you might have stated what is your problem but it lacks a bit of details about what you did exactly, in order to know where you are "stuck". No details require longer answers so:
To run charts you need:
- webserver / hosting that allow creation of mysql databases.
- an empty mysql database (if you're using a webhosting, you can usually create db in control panels)
After, read the readmes. there are scripts that will help you setting up your database by creating tables and populating the db.
3.2 Populate the database:
Create an empty database in your MySQL database server.
Copy buildDatabase.py from the /tools directory to the root
of your Frets on Fire directory and run it.
Run: buildDatabase.py -init "host" "user" "passwd" "db"
to create the required tables.
After that, you can run buildDatabase -f or -s to either dump
the sql queries to a file that can be imported, or directly
to the database. Run buildDatabase.py without parameters for
more information.
As an option, you can run uploadScores.py to upload all your
scores to you newly created scorechart.
Run: uploadScores.py frets_dir upload_url
e.g. uploadScores.py C:/frets http://www.myhomepage.com/upload.php
you can notice these are python scripts so you need python installed on your computer.
the scripts also need the python mysql module, find it here: http://sourceforge.net/projects/mysql-python
to use the scripts, you need to be able to access your mysql host remotely (as opposed to your php scripts that usually connect locally with "localhost"). the remote access host is the host you want to use in " buildDatabase.py -init "host" "user" "passwd" "db" " (notice the -init flag, that you use to create the tables in your db)
if you do not have remote access to your database, use the provided mysql manager (like phpmyadmin). find a "sql" tab where you can execute queries and use the instructions written in the scripts
Code: Select all
CREATE TABLE `songs` (
`hash` VARCHAR( 40 ) NOT NULL ,
`artist` TEXT NOT NULL ,
`title` TEXT NOT NULL ,
`file` TEXT NOT NULL ,
PRIMARY KEY ( `hash` )
) ENGINE = myisam
and
Code: Select all
CREATE TABLE `scores` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`hash` VARCHAR( 40 ) NOT NULL ,
`difficulty` VARCHAR( 50 ) NOT NULL ,
`score` INT NOT NULL ,
`name` VARCHAR( 100 ) NOT NULL ,
`stars` INT NOT NULL ,
UNIQUE (
`hash` ,
`difficulty` ,
`score` ,
`name` ) ENGINE = MYISAM
After that you need to add songs to your songs table. Run the builddatabase script without the -init flag in your songs folder. If you can't remotely connect to the mysql db, simply dump the songs queries in a file with the -f <filename> flag. With a client like phpmyadmin you can easily import text files in mysql. After that you're pretty much done with the mysql part
Last edited by raph666 on Thu Sep 04, 2008 11:07 am, edited 1 time in total.
not a robot
- raph666
- Administrator
- Posts: 2426
- Joined: March 9th, 2007
- Location: dans la mer du nord
- Reputation: 20
- Contact:
lnkk wrote:actually u need a host that allows running Python scripts.
There is a difference between python and the Django framework. To run the "official world charts" system you need more than a host that "allows running Python scripts"
Here are the prerequisites:
- Python 2.4 or newer
- Django 0.96 or newer
- MySQL Server 4.0 or newer
- Apache web server (or any other web server)
- Apache mod_python
- Python Imaging
- Python MySQLdb
Though most hostings will have python installed, not that many will support Django. Of course, if you're running you're own server this is not a problem but for "free" or cheap hosting, maybe the mysql + php charts are a better (and easy) solution, hence my previous reply.
Last edited by raph666 on Thu Sep 04, 2008 4:00 pm, edited 1 time in total.
Bridged To The Sun.
- acrox999
- Member
- Posts: 3597
- Joined: March 22nd, 2008
- Location: /opt/bin/fretsonfire
- Reputation: 1
- Contact:
not a robot
- raph666
- Administrator
- Posts: 2426
- Joined: March 9th, 2007
- Location: dans la mer du nord
- Reputation: 20
- Contact:
Re: World Charts, HELP - need help
acrox999 wrote:I think you need to have dJango installed first.
Thanks for not reading and bumping an old thread.
This is exactly what we were saying:
World Charts: django + the other requisites in my previous post; powerful and efficient. runs better on personal/pro servers
sneftrup's charts (base of Divra's charts, the contest servers, my charts, etc.): php + mysql; easy to use and setup, suited for most hosting plans with a reasonable amount of players.
Return to “High Score Discussion”
Who is online
Users browsing this forum: No registered users and 35 guests