Upgrade database structure¶
New or extended xxv-functions involve often also a change of the database structure. After the installation of an update, you should therefore call first always the script contrib/update-xxv. XXV should not be started at this time.
In the simplest case must transfer no parameters to her to the script. This presupposes however that MySQL on the local computer is installed that the database is called 'xxv' and the database administrator 'root' does not possess a password.
#> cd $SOURCEDIR/contrib #> ./update-xxv
Beyond that can to the script a set of parameters hand over, which also control a few extended functions apart from the access to the database you. An overview of all parameters receive you with:
#> cd $SOURCEDIR/contrib #> ./update-xxv -h update-xxv ---------- Usage: update-xxv [-b] [-h hostname] [-P port] [-d database] [-u user] [-p password] -b {target} : Make a backup first to {target}.gz -H {hostname} : Host name of the MySQL server (default: localhost) -P {port} : Port number of MySQL server -d {database} : XXV database name (default: xxv) -u {user} : Username (default: root) -p {password} : Password (default: no password) -a : Ask for password (once every run of mysql) -A : Ask for password (just once) -f : Force upgrade, do not check version -h : Help
With the parameter -b is accomplished before the update a backup of the database. In addition the name of the backupfile (without the ending gz) must be indicated. The parameters -H (hostname) and -P (port) control the access to the MySQL server. This localhost and haven are according to standard 3306. If the database should not be called 'xxv', then can you with -D another name select.
The database user can specify you with -u and its password with -p. In order to be able to accomplish the update, the database user needs this access rights. Maybe usually only the administrator 'root' has this rights.
Safety reference:
With the delivery of the password in the command line parameters the password becomes visible for one moment for all other user of the local system ('ps -fA' indicates all processes with their parameters!). Alternatively have you therefore the possibility, by means of -A the update script for the password ask of letting.
Database updates are accomplished by update xxv only if you are really necessary. Should times somewhat inclined run or if you would like on an old database structure 'downgrade', then can you the update with -f force.
With a successful database update a list of the accomplished actions spends update xxv:
update-xxv ---------- Info: Checking Server Info: Checking Database Info: Retrieving current version Info: current database version: 23 Info: new database version: 26 Info: Starting update... Info: Saving Data Info: Updating Database Info: Restoring Data Info: Updateing Version Info: Update successful
In the event of an error "error:..." messages spent. The most probable cause for an error is the database access. You should examine first thus username, password, database name and host.
After the update can you XXV again start:
#> /etc/init.d/xxvd start
Subsequently, control the log file:
#> tail -f /var/log/xxvd.log
If any error messages should emerge because of missing Perl modules in the log file, then should install these for her.