Download MySQL RPM dari URL berikut :
http://dev.mysql.com/downloads/mysql/
1. Install Mysql :
root# rpm -Uvh MySQL-shared-standard-5.0.24-0.rhel4.i386.rpm
root# rpm -Uvh MySQL-server-standard-5.0.24-0.rhel4.i386.rpm
root# rpm -Uvh MySQL-client-standard-5.0.24-0.rhel4.i386.rpm
*) kalian bisa sesuaikan dengan package RPM sesuai versi MySQL yang kalian download.
2. masuk ke Grant user tabel :
cd /usr/bin
root# ./mysql_install_db --user=mysql
3. pastikan bahwa kalian sudah melakukan bounce ke MySQL :
root# mysqladmin shutdown
root# ps -ef | grep mysqld
root 7842 2565 0 18:47 pts/1 00:00:00 grep mysqld
root# mysqld_safe --user=mysql --log &
[1] 7843
root# Starting mysqld daemon with databases from /var/lib/mysql
4. verifikasi server MySQL sudah running :
root# mysqladmin version
root# mysqladmin variables
root# mysqlshow
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
root# mysql -e "SELECT Host, Db, User FROM db" mysql
+------+---------+------+
| Host | Db | User |
+------+---------+------+
| % | test | |
| % | test\_% | |
+------+---------+------+
5. konfigure startup/shutdown; Optionally, konfigure /etc/my.cnf file; Test sebagai appropriate:
root# ls -lart /etc/init.d/mysql
-rwxr-xr-x 1 root root 9359 Jul 27 15:39 /etc/init.d/mysql
root# touch /etc/my.cnf
root# vi /etc/my.cnf (can direct edit with text editor in /etc/my.cnf)
--> Press "Insert" in the keyboard and type :
[mysqld]
log=/var/tmp/mylog.log
--> Press "Esc" in the keyboard and type :
:qw
root# more /etc/my.cnf
root# chkconfig --add mysql
root# chkconfig --list mysql
mysql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
root# service mysql stop
root# service mysql start
6. Login dan hapus user yang tidak di perlukan :
root# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.24-standard-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> DELETE FROM mysql.user WHERE User='';
Query OK, 2 rows affected (0.00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT Host, User from mysql.user;
+-----------+------+
| Host | User |
+-----------+------+
| localhost | root |
| tuxboy | root |
+-----------+------+
2 rows in set (0.01 sec)
7.membuat root users dan passwords :
mysql> select Host, User, Password from mysql.user;
+-----------+------+----------+
| Host | User | Password |
+-----------+------+----------+
| localhost | root | |
| tuxboy | root | |
+-----------+------+----------+
2 rows in set (0.00 sec)
mysql> UPDATE user set Password = PASSWORD('pa$$w1rd');
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> select Host, User, Password from user;
+-----------+------+-------------------------------------------+
| Host | User | Password |
+-----------+------+-------------------------------------------+
| localhost | root | *49C77AEDAAEDE6B380A0EF8A48F62A277ECFAE6B |
| tuxboy | root | *49C77AEDAAEDE6B380A0EF8A48F62A277ECFAE6B |
+-----------+------+-------------------------------------------+
silahkan di coba yah kawan2 .. ^_^