The ARCHIVE
storage engine is used for storing large amounts of data without indexes in a very small footprint.
The ARCHIVE
storage engine is included in MySQL binary distributions, but not with RHEL5/Fedora binary rpm’s. To enable this storage engine if you build MySQL from source, invoke configure with the --with-archive-storage-engine
option.
- Download mysql
- Uncompress source
tar zxvf mysql-5.0.51b.tar.gz
cd mysql-5.0.51b
useradd mysql -b /var/lib/mysql
./configure –with-mysqld-user=mysql –with-archive-storage-engine –datadir=/var/lib/mysql/
make && make install - Now install initial database with command:
/usr/local/bin/mysql_install_db - Copy startup script
cp /usr/local/mysql-5.0.51b/support-files/mysql.server /etc/init.d/mysqld - Do a chmod to the copied startup shell script
chmod 755 /etc/init.d/mysqld - Add to chkconfig
chkconfig –add mysqld - Set the runlevels for mysql service
chkconfig –level 345 mysqld on - Check Engines
mysql -h localhost -u root -pWelcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.51b Source distributionType ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> show engines;
+————+———+—————————————————————-+
| Engine | Support | Comment |
+————+———+—————————————————————-+
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys |
| BerkeleyDB | NO | Supports transactions and page-level locking |
| BLACKHOLE | NO | /dev/null storage engine (anything you write to it disappears) |
| EXAMPLE | NO | Example storage engine |
| ARCHIVE | YES | Archive storage engine |
| CSV | NO | CSV storage engine |
| ndbcluster | NO | Clustered, fault-tolerant, memory-based tables |
| FEDERATED | NO | Federated MySQL storage engine |
| MRG_MYISAM | YES | Collection of identical MyISAM tables |
| ISAM | NO | Obsolete storage engine |
+————+———+—————————————————————-+
12 rows in set (0.00 sec)mysql>
That’s it!!!
[root@anuj mysql-5.0.51b]# /usr/local/bin/mysql_install_db
Installing MySQL system tables…
OK
Filling help tables…
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/bin/mysqladmin -u root password ‘new-password’
/usr/local/bin/mysqladmin -u root -h anuj.sytes.net password ‘new-password’
Alternatively you can run:
/usr/local/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/local/bin/mysqlbug script!
The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
Anuj Singh