PS Web Console Setup
Planeshift Database Setup
At time of writing the planeshift user and database do not appear to get created automatically.
Prerequisites
You must already have installed a web server, MySQL server and PHP.
Database Creation
Using PHPmyAdmin or your preferred method of SQL maintenance, create a database called planeshift.
Database Population
If you use mysqladmin and are in the root folder of the planeshift CVS go to src/server/database/mysql and use mysqladmin to run the query in the file create_all.sql to populate the planeshift db with the initial data.
NOTE:This query will not run correctly if you do not have Create and Drop privilege, as sometimes happens with just installed MySQL/PHPmyAdmin. In that case, delete the first two lines before you run the query.
OR
If you use phpmyadmin on windows run _CREATE_ALL.BAT, in Msys type: cmd //c _CREATE_ALL.BAT, and paste all the contents of the Notepad window that opens into your SQL query box in phpmyadmin. See _CREATE_ALL.BAT.
In either case: You may find that the script does not completely populate the database and that you get errors when it runs. At present the files characters.sql and item_instances.sql both raise errors on my system as the result of commented lines being preceded with -- instead of ##. You will need to hand edit any such files to make them compatible with your system.
See the notes here on how to correctly populate the table planeshift.sectors.
User Creation
Create a user called planeshift, with password planeshift, all privileges on the database planeshift and restricted to accessing the database from localhost only.
Planeshift Web Console Setup
| <?PHP
error_reporting (E_ERROR | E_WARNING | E_PARSE | !E_NOTICE); $db_hostname = "localhost"; $db_username = "planeshift"; $db_password = "planeshift"; $db_name = "planeshift"; ?> |
See Web Console Guide for instructions on how to use the web console.
It would be nice if the configure or make scripts created a database user with default parameters and set up the database if they did not already exist, and backed up the current database if it did exist and then updated the table structures to reflect those in the current CVS.
It would also be nice if there was a ps_temp database that existed to allow web console users to run table reconfiguration and repopulation routines.