web analytics
Evan && Or && Id

Install MySQL di FreeBSD

by on Dec.04, 2010, under Belajar IT, Ngoprek

Langsung aja… kita install lewat port aja ya…

push# cd /usr/ports/ && make search name=mysql-server

Port:   mysql-server-5.1.53
Path:   /usr/ports/databases/mysql51-server
Info:   Multithreaded SQL database (server)
Maint:  ale@FreeBSD.org
B-deps: mysql-client-5.1.53
R-deps: mysql-client-5.1.53
WWW:    http://www.mysql.com/

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

setelah terinstall create database :

push# /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 push.idconnect.co.id 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 /usr/local/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/bin/mysqlbug script!

Nah.. setelah itu ganti kepemilikan dan group-nya ke mysql :
push# chown -R mysql /var/db/mysql/
push# chgrp -R mysql /var/db/mysql/

Jalankan daemon mysql-nya:
push# cd /usr/local ; /usr/local/bin/mysqld_safe &
[1] 4443
push# 101204 03:30:43 mysqld_safe Logging to ‘/var/db/mysql/push.idconnect.co.id.err’.
101204 03:30:43 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql

cek status-nya menggunakan perintah #ps -aux
mysql 4486 0.0 1.1 45804 22028 p0 I 3:30AM 0:00.13 /usr/local/libexec/mysqld –basedir=/usr/local –datadir=/var/db/mysql –user=mysql –log-error=/var/db/mysql/push.idconnect.co

Setelah itu set password-nya :
push# /usr/local/bin/mysqladmin -u root password inipassword
push# /usr/local/bin/mysqladmin -u root -h push.idconnect.co.id password inipassword

Agar mysql otomatis jalan pas server reboot gunakan perintah ini :
push# echo ‘mysql_enable=”YES”‘ >> /etc/rc.conf

Done…!!!

Share on Facebook

Komentar

komentar


Leave a Reply


Fatal error: Call to undefined function akismet_counter() in /home/k2165489/public_html/wp-content/themes/pixel/single.php on line 58