This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

Install MySQL Via Ports

MySQL is a database application that is very fast and very reliable. You can read more about it by visiting http://www.mysql.com/.

This tutorial installs version 5.0.51a.

Install MySQL via ports:

#cd /usr/ports/databases/mysql50-server
#make all install clean

Add mysqld to system startup:
#echo 'mysql_enable="YES"' >> /etc/rc.conf

Start MySQL:

#/usr/local/etc/rc.d/mysql-server start

Secure MySQL root user account and delete nameless user(s):
#mysql -u root mysql
>UPDATE user SET Password=PASSWORD('mysql_root_password') WHERE User='root';
>DELETE FROM user WHERE User='';
>FLUSH PRIVILEGES;
>quit;

Copy my.cnf for MySQL:
#cp /usr/local/share/mysql/my-medium.cnf /var/db/mysql/my.cnf
Edit /var/db/mysql/my.cnf file:
This is to allow MySQL to process files up to 10 Megabytes in size and
also keep the INNODB files from getting too large.

Find and edit the RED TEXT.

[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 10M
table_cache = 64
sort_buffer_size = 512K
...
# Uncomment the following if you are using InnoDB tables
innodb_data_home_dir = /var/db/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /var/db/mysql/
innodb_log_arch_dir = /var/db/mysql/

# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M

# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50


Restart MySQL for new changes:
#/usr/local/etc/rc.d/mysql-server restart

Leave a Reply