Posts

Showing posts with the label MySQL

Configuring MySQL on Redhat Linux while utilising network (iSCSI) storage.

Challenges: MySQL only allows a single location to be specified as the default data store for all databases. Consider the following typical scenario: A database server running one instance of MySQL has its datastore located at /mysql/databases. This server will contain multiple databases for multiple applications. The database tables are a mixture of InnoDB and MYISAM storage engines. The storage is provided by a SAN and separate storage volumes (iSCSI targets) are provisioned for each database. In this scenario, you would want all your MYISAM files (*.MYI, *.MYD, *.frm) and all your InnoDB table spaces to be contained on the same iSCSI volume on a per-database basis. Solution: This is easily achieved by mounting the iSCSI target on a sub-folder of /mysql/databases. For example: Mount iqn.openfiler.com:2006-06:blog-db-storage on /mysql/databases/blog Here is a sequence of steps that need to be carried out to make this work. in /etc/my.cnf set datastore=/mysql/da...

osCommerce & Register Globals

What happens when your web host finally get's around to upgrading to php5 and MySQL 5? Here is what happened to me in order: 1. Rejoice because finally your website is hosted according to industry standards. 2. Panic because you are unprepared. 3. Worked through the night to get the website updated. In order to migrate an osCommerce website from php4 to php5 there is really only one thing you need to worry about and that's a little "feature" in php called, Register Globals. Register Globals makes every variable contained in the URL, POST, SESSION and ENVIRONMENT directly available in every script. What this means is that with register globals turned on, you can write a webform that posts a variable to a script and that script can refer to the variable in the POST by name. For example: <?php /* ** Example script to show what happens when register globals is turned on. ** ** A form will submit POST data to this website as follows: ** String $_POST['name'];...