Test Block Top

The Blog...
Articles, Tips & Trick and Other Interesting Information...
Tampilkan postingan dengan label MySQL. Tampilkan semua postingan
Tampilkan postingan dengan label MySQL. Tampilkan semua postingan
13 Mei 2012

Optimize MySQL (Fix Overhead Table)

Kecepatan akses load website atau blog anda menurun? Bisa jadi itu karena terlalu banyak plugin, addon, script, embed gambar yang terlalu banyak atau traffic web server sedang ramai. Namun faktor-faktor tersebut tidak selalu menjadi penyebab load situs menurun.

Database yang kurang terpelihara bisa juga menjadi penyebab load website/blog lambat. Membengkaknya ukuran file database selalu berbanding lurus dengan penambahan data pada website/blog, baik itu penambahan konten (content), plugin, komentar (comment) atau jenis penambahan data lainnya. Seiring dengan penambahan data-data ini, database menjadi terfragmentasi (konsepnya identik dengan fragment pada hard disk PC). Akibatnya koneksi request data antara browser client dengan database memakan waktu lebih lama. Ini yang menyebabkan data pada disk menjadi Overhead.

Dari uraian di atas, sederhananya begini; ibarat ratusan atau ribuan buku diperpustakaan yang tidak dikelompokkan (campur aduk), akan memakan waktu lama untuk mencari buku matematika misalnya diantara jenis buku lainnya (Fisika, Kimia, Bahasa, Sejarah, dlsb) yang amburadul/semrawut (tidak tertata). Namun akan lebih efisien jika buku-buku tersebut dikelompokkan berdasarkan jenisnya dan menyisihkan buku-buku yang sudah usang, waktu pencarian buku akan menjadi lebih cepat.

Bagi anda yang merasa akses kecepatan website/blog nya menurun, tips optimize overhead table database berikut ini bisa anda terapkan.

  1. Pertama-tama, pastikan anda sudah buat backup database & website/blog jika memungkinkan ganti ke mode maintenance atau pilih waktu optimize ketika traffic website/blog tidak terlalu ramai.
  2. Login ke halaman phpMyAdmin via cPanel atau custom directory (http://domain-anda.com/phpmyadmin misalnya) jika anda install phpMyAdmin terpisah (tidak bundle dengan cPanel) pada server VPS / dedicated server.
  3. Klik pada database yang ingin dioptimize, kemudian anda akan melihat daftar table (table paling kiri) dan overhead table (table paling kanan). Lihat screenshot di bawah.
    Optimize Overhead Table

    Optimize Overhead Table

  4. Klik pada overhead table, kemudian klik Optimize table (Screenshot lihat di bawah).
    Optimize Overhead Table 2

    Optimize Overhead Table 2

  5. Jika optimize berhasil, anda akan melihat pesan konfirmasi Optimize Table sukses.

    Success Message:

    Your SQL query has been executed successfully

    OPTIMIZE TABLE 'wp_yarpp_related_cache'

    Optimize Overhead Table 3

    Optimize Overhead Table 3

  6. Ulangi langkah ke-3 & 4 untuk optimize table lainnya sampai tidak ada lagi table overhead.
Optimize overhead table database sampai di sini selesai.

Tambahan:

Ketika user hapus item data pada interface admin maupun client area, row pada table database tidak sepenuhnya terhapus (hanya hapus data query). Identik dengan keranjang sampah (recycle bin) pada komputer PC, komputer atau server akan tetap menyaring (identifikasi) data baik itu data kosong maupun data aktual. Proses identifikasi inilah yang menentukan lama tidaknya query browser client ke database. Jika database terlalu besar imbasnya kecepatan akses load website/blog menjadi lebih lambat.

Ilustrasi pada sample artikel ini, plugin WordPress Download Monitor sudah tidak saya gunakan lagi + sudah terhapus dari daftar plugin & disk (ruang penyimpanan). Namun tidak pada table database MySQL (Lihat Screenshot di bawah). Untuk lebih mengoptimalkan database MySQL, anda dapat meminimalkan identifikasi data dengan menghapus table-table sampah yang sudah tidak terpakai. Klik pada link Drop table yang ingin dihapus satu per satu, atau klik pada checkbox sebelah kiri table untuk hapus beberapa tabel sekaligus → kemudian pada dropdown menu pilih Drop (Lihat Screenshot di bawah).
DROP Junk Table

DROP Junk Table

Pada pensan konfirmasi DROP TABLE → klik tombol Yes

Do you really want to :

DROP TABLE 'wp_download_monitor_files', 'wp_download_monitor_file_meta', 'wp_download_monitor_formats', 'wp_download_monitor_log', 'wp_download_monitor_relationships', 'wp_download_monitor_stats', 'wp_download_monitor_taxonomies';
Drop Table Confirm

Drop Table Confirm

Your SQL query has been executed successfully

DROP TABLE 'wp_download_monitor_files',
'wp_download_monitor_file_meta',
'wp_download_monitor_formats',
'wp_download_monitor_log',
'wp_download_monitor_relationships',
'wp_download_monitor_stats',
'wp_download_monitor_taxonomies';


Table Dropped

Table Dropped

Selesai.

Tips:

Lakukan pengecekan overhead table & table sampah (junk table) setidak-tidaknya satu bulan sekali untuk menghindari table crash.

Semoga bermanfaat...
:)
02 Mei 2012

Install phpMyAdmin Via yum Pada CentOS

phpMyAdmin adalah script (software) tool php yang dikhususkan untuk meng-handle administrasi database MySQL dan dapat diakses via internet (menggunakan Web Browser) dari seluruh dunia. Script ini dapat handle seluruh MySQL database (diperlukan satu super-user) sehingga memudahkan administrator untuk memanage database-database pada server.

Pada posting artikel kali ini, saya akan coba menunjukkan cara mudah install phpMyAdmin pada CentOS (Versi 6.2) menggunakan yum.

Download & Install EPEL Repository




  1. i386
    wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/i386/epel-release-6-5.noarch.rpm

  2. x86_64
    wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/x86_64/epel-release-6-5.noarch.rpm



[bash autolinks="true"]
[root@linggih ~]# wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/x86_64/epel-release-6-5.noarch.rpm
--2012-05-01 14:08:48-- ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/x86_64/epel-release-6-5.noarch.rpm
=> âepel-release-6-5.noarch.rpmâ
esolving ftp.pbone.net... 85.14.85.4
Connecting to ftp.pbone.net|85.14.85.4|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/x86_64 ... done.
==> SIZE epel-release-6-5.noarch.rpm ... 14064
==> PASV ... done. ==> RETR epel-release-6-5.noarch.rpm ... done.
Length: 14064 (14K) (unauthoritative)

100%[======================================>] 14,064 15.2K/s in 0.9s

2012-05-01 14:08:55 (15.2 KB/s) - âepel-release-6-5.noarch.rpmâ

[root@linggih ~]#
[/bash]

Install rpm dengan command rpm -Uvh epel-release-6*.rpm

[bash autolinks="true"]
[root@linggih ~]# rpm -Uvh epel-release-6*.rpm
warning: epel-release-6-5.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
[root@linggih ~]#
[/bash]

Download & Install Remi Repository




  1. i386
    ftp://ftp.pbone.net/mirror/rpms.famillecollet.com/enterprise/6/remi/i386/remi-release-6-1.el6.remi.noarch.rpm

  2. x86_64
    ftp://ftp.pbone.net/mirror/rpms.famillecollet.com/enterprise/6/remi/x86_64/remi-release-6-1.el6.remi.noarch.rpm



[bash autolinks="true"]
[root@linggih ~]# wget ftp://ftp.pbone.net/mirror/rpms.famillecollet.com/enterprise/6/remi/x86_64/remi-release-6-1.el6.remi.noarch.rpm
--2012-05-01 14:12:38-- ftp://ftp.pbone.net/mirror/rpms.famillecollet.com/enterprise/6/remi/x86_64/remi-release-6-1.el6.remi.noarch.rpm
=> âremi-release-6-1.el6.remi.noarch.rpmâ
esolving ftp.pbone.net... 85.14.85.4
Connecting to ftp.pbone.net|85.14.85.4|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /mirror/rpms.famillecollet.com/enterprise/6/remi/x86_64 ... done.
==> SIZE remi-release-6-1.el6.remi.noarch.rpm ... 5292
==> PASV ... done. ==> RETR remi-release-6-1.el6.remi.noarch.rpm ... done.
Length: 5292 (5.2K) (unauthoritative)

100%[======================================>] 5,292 --.-K/s in 0.01s

2012-05-01 14:12:44 (376 KB/s) - âremi-release-6-1.el6.remi.noarch.rpmâ

[root@linggih ~]#
[/bash]

Install rpm dengan command rpm -Uvh remi-release-6*.rpm

[bash autolinks="true"]
[root@linggih ~]# rpm -Uvh remi-release-6*.rpm
warning: remi-release-6-1.el6.remi.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Preparing... ########################################### [100%]
1:remi-release ########################################### [100%]
[root@linggih ~]#
[/bash]

Konfigurasi Remi Repository

Buka file Remi repository "/etc/yum.repos.d/remi.repo" dan edit value enabled=0 ke enabled=1.

[apache autolinks="true" firstline="1" gutter="true" highlight="5" light="true" ruler="true" smarttabs="true" tabsize="4" toolbar="true"]
[remi]
name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority
[/apache]

Install phpMyAdmin



Jalankan command yum berikut ini untuk mulai install phpMyAdmin

yum install phpmyadmin

[bash autolinks="true"]
[root@linggih ~]# yum install phpmyadmin
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink | 4.7 kB 00:00
* base: centos.biz.net.id
* epel: epel.idrepo.or.id
* extras: centos.biz.net.id
* remi: rpms.famillecollet.com
* updates: mirror.vietoss.com
epel | 4.0 kB 00:00
epel/primary_db | 4.3 MB 00:19
remi | 2.9 kB 00:00
remi/primary_db | 247 kB 00:03
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.5.0-1.el6.remi will be installed
--> Processing Dependency: php-mcrypt >= 5.2.0 for package: phpMyAdmin-3.5.0-1.el6.remi.noarch
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.3.11-1.el6.remi will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.11-1.el6.remi for package: php-mcrypt-5.3.11-1.el6.remi.x86_64
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: php-mcrypt-5.3.11-1.el6.remi.x86_64
--> Running transaction check
---> Package libmcrypt.x86_64 0:2.5.8-9.el6 will be installed
---> Package php-common.x86_64 0:5.3.3-3.el6_2.6 will be updated
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-xmlrpc-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-cli-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-odbc-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-ldap-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-mysql-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-pgsql-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-intl-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-tidy-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-soap-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-enchant-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-zts-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-xml-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-process-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-embedded-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-imap-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-pspell-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-gd-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-recode-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-mbstring-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-dba-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-snmp-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-pdo-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-bcmath-5.3.3-3.el6_2.6.x86_64
---> Package php-common.x86_64 0:5.3.11-1.el6.remi will be an update
--> Running transaction check
---> Package php.x86_64 0:5.3.3-3.el6_2.6 will be updated
--> Processing Dependency: php = 5.3.3-3.el6_2.6 for package: php-devel-5.3.3-3.el6_2.6.x86_64
---> Package php.x86_64 0:5.3.11-1.el6.remi will be obsoleting
---> Package php-bcmath.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-bcmath.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-cli.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-cli.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-dba.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-dba.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-embedded.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-embedded.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-enchant.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-enchant.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-gd.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-gd.x86_64 0:5.3.11-1.el6.remi will be an update
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.3.11-1.el6.remi.x86_64
---> Package php-imap.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-imap.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-intl.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-intl.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-ldap.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-ldap.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-mbstring.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-mbstring.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-mysql.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-mysql.x86_64 0:5.3.11-1.el6.remi will be an update
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.3.11-1.el6.remi.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: php-mysql-5.3.11-1.el6.remi.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.3.11-1.el6.remi.x86_64
---> Package php-odbc.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-odbc.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-pdo.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-pdo.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-pgsql.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-pgsql.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-process.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-process.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-pspell.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-pspell.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-recode.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-recode.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-snmp.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-snmp.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-soap.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-soap.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-tidy.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-tidy.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-xml.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-xml.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-xmlrpc.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-xmlrpc.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package php-zts.x86_64 0:5.3.3-3.el6_2.6 will be obsoleted
--> Running transaction check
---> Package mysql-libs.x86_64 0:5.1.61-1.el6_2.1 will be updated
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql-server-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: mysql-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-2.2.el6_1.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql-server-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package: mysql-server-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package: mysql-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: mysql-libs = 5.1.61-1.el6_2.1 for package: mysql-5.1.61-1.el6_2.1.x86_64
---> Package mysql-libs.x86_64 0:5.5.23-1.el6.remi will be an update
---> Package php-devel.x86_64 0:5.3.3-3.el6_2.6 will be updated
---> Package php-devel.x86_64 0:5.3.11-1.el6.remi will be an update
---> Package t1lib.x86_64 0:5.1.2-6.el6_2.1 will be installed
--> Running transaction check
---> Package compat-mysql51.x86_64 0:5.1.54-1.el6.remi will be installed
---> Package mysql.x86_64 0:5.1.61-1.el6_2.1 will be updated
---> Package mysql.x86_64 0:5.5.23-1.el6.remi will be an update
---> Package mysql-server.x86_64 0:5.1.61-1.el6_2.1 will be updated
---> Package mysql-server.x86_64 0:5.5.23-1.el6.remi will be an update
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-server-5.5.23-1.el6.remi.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-server-5.5.23-1.el6.remi.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: mysql-server-5.5.23-1.el6.remi.x86_64
--> Running transaction check
---> Package libaio.x86_64 0:0.3.107-10.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
php x86_64 5.3.11-1.el6.remi remi 2.3 M
replacing php-zts.x86_64 5.3.3-3.el6_2.6
phpMyAdmin noarch 3.5.0-1.el6.remi remi 4.7 M
Installing for dependencies:
compat-mysql51 x86_64 5.1.54-1.el6.remi remi 1.4 M
libaio x86_64 0.3.107-10.el6 base 21 k
libmcrypt x86_64 2.5.8-9.el6 epel 96 k
php-mcrypt x86_64 5.3.11-1.el6.remi remi 40 k
t1lib x86_64 5.1.2-6.el6_2.1 updates 160 k
Updating for dependencies:
mysql x86_64 5.5.23-1.el6.remi remi 5.7 M
mysql-libs x86_64 5.5.23-1.el6.remi remi 768 k
mysql-server x86_64 5.5.23-1.el6.remi remi 10 M
php-bcmath x86_64 5.3.11-1.el6.remi remi 40 k
php-cli x86_64 5.3.11-1.el6.remi remi 2.2 M
php-common x86_64 5.3.11-1.el6.remi remi 891 k
php-dba x86_64 5.3.11-1.el6.remi remi 51 k
php-devel x86_64 5.3.11-1.el6.remi remi 2.1 M
php-embedded x86_64 5.3.11-1.el6.remi remi 1.1 M
php-enchant x86_64 5.3.11-1.el6.remi remi 32 k
php-gd x86_64 5.3.11-1.el6.remi remi 132 k
php-imap x86_64 5.3.11-1.el6.remi remi 69 k
php-intl x86_64 5.3.11-1.el6.remi remi 102 k
php-ldap x86_64 5.3.11-1.el6.remi remi 47 k
php-mbstring x86_64 5.3.11-1.el6.remi remi 895 k
php-mysql x86_64 5.3.11-1.el6.remi remi 124 k
php-odbc x86_64 5.3.11-1.el6.remi remi 67 k
php-pdo x86_64 5.3.11-1.el6.remi remi 109 k
php-pgsql x86_64 5.3.11-1.el6.remi remi 102 k
php-process x86_64 5.3.11-1.el6.remi remi 50 k
php-pspell x86_64 5.3.11-1.el6.remi remi 31 k
php-recode x86_64 5.3.11-1.el6.remi remi 26 k
php-snmp x86_64 5.3.11-1.el6.remi remi 34 k
php-soap x86_64 5.3.11-1.el6.remi remi 208 k
php-tidy x86_64 5.3.11-1.el6.remi remi 44 k
php-xml x86_64 5.3.11-1.el6.remi remi 160 k
php-xmlrpc x86_64 5.3.11-1.el6.remi remi 60 k

Transaction Summary
================================================================================
Install 7 Package(s)
Upgrade 27 Package(s)

Total download size: 34 M
Is this ok [y/N]: y
Downloading Packages:
(1/34): compat-mysql51-5.1.54-1.el6.remi.x86_64.rpm | 1.4 MB 00:12
http://centos.biz.net.id/6.2/os/x86_64/Packages/libaio-0.3.107-10.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
(2/34): libaio-0.3.107-10.el6.x86_64.rpm | 21 kB 00:00
(3/34): libmcrypt-2.5.8-9.el6.x86_64.rpm | 96 kB 00:00
(4/34): mysql-5.5.23-1.el6.remi.x86_64.rpm | 5.7 MB 00:34
(5/34): mysql-libs-5.5.23-1.el6.remi.x86_64.rpm | 768 kB 00:07
(6/34): mysql-server-5.5.23-1.el6.remi.x86_64.rpm | 10 MB 00:49
(7/34): php-5.3.11-1.el6.remi.x86_64.rpm | 2.3 MB 00:16
(8/34): php-bcmath-5.3.11-1.el6.remi.x86_64.rpm | 40 kB 00:02
(9/34): php-cli-5.3.11-1.el6.remi.x86_64.rpm | 2.2 MB 00:17
(10/34): php-common-5.3.11-1.el6.remi.x86_64.rpm | 891 kB 00:08
(11/34): php-dba-5.3.11-1.el6.remi.x86_64.rpm | 51 kB 00:02
(12/34): php-devel-5.3.11-1.el6.remi.x86_64.rpm | 2.1 MB 00:17
(13/34): php-embedded-5.3.11-1.el6.remi.x86_64.rpm | 1.1 MB 00:09
(14/34): php-enchant-5.3.11-1.el6.remi.x86_64.rpm | 32 kB 00:01
(15/34): php-gd-5.3.11-1.el6.remi.x86_64.rpm | 132 kB 00:04
(16/34): php-imap-5.3.11-1.el6.remi.x86_64.rpm | 69 kB 00:02
(17/34): php-intl-5.3.11-1.el6.remi.x86_64.rpm | 102 kB 00:03
(18/34): php-ldap-5.3.11-1.el6.remi.x86_64.rpm | 47 kB 00:02
(19/34): php-mbstring-5.3.11-1.el6.remi.x86_64.rpm | 895 kB 00:08
(20/34): php-mcrypt-5.3.11-1.el6.remi.x86_64.rpm | 40 kB 00:02
(21/34): php-mysql-5.3.11-1.el6.remi.x86_64.rpm | 124 kB 00:03
(22/34): php-odbc-5.3.11-1.el6.remi.x86_64.rpm | 67 kB 00:02
(23/34): php-pdo-5.3.11-1.el6.remi.x86_64.rpm | 109 kB 00:03
(24/34): php-pgsql-5.3.11-1.el6.remi.x86_64.rpm | 102 kB 00:03
(25/34): php-process-5.3.11-1.el6.remi.x86_64.rpm | 50 kB 00:02
(26/34): php-pspell-5.3.11-1.el6.remi.x86_64.rpm | 31 kB 00:01
(27/34): php-recode-5.3.11-1.el6.remi.x86_64.rpm | 26 kB 00:01
(28/34): php-snmp-5.3.11-1.el6.remi.x86_64.rpm | 34 kB 00:01
(29/34): php-soap-5.3.11-1.el6.remi.x86_64.rpm | 208 kB 00:04
(30/34): php-tidy-5.3.11-1.el6.remi.x86_64.rpm | 44 kB 00:01
(31/34): php-xml-5.3.11-1.el6.remi.x86_64.rpm | 160 kB 00:03
(32/34): php-xmlrpc-5.3.11-1.el6.remi.x86_64.rpm | 60 kB 00:02
(33/34): phpMyAdmin-3.5.0-1.el6.remi.noarch.rpm | 4.7 MB 00:27
(34/34): t1lib-5.1.2-6.el6_2.1.x86_64.rpm | 160 kB 00:08
--------------------------------------------------------------------------------
Total 117 kB/s | 34 MB 04:57
warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 00f97f56: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Importing GPG key 0x00F97F56:
Userid : Remi Collet <RPMS@FamilleCollet.com>
Package: remi-release-6-1.el6.remi.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL (6) <epel@fedoraproject.org>
Package: epel-release-6-5.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Updating : php-common-5.3.11-1.el6.remi.x86_64 1/63

WARNING : These php-* RPM are not official Fedora/Redhat build and
overrides the official ones. Don't file bugs on Fedora Project nor Redhat.

Use dedicated forums http://forums.famillecollet.com/

Updating : php-pdo-5.3.11-1.el6.remi.x86_64 2/63
Updating : mysql-libs-5.5.23-1.el6.remi.x86_64 3/63

WARNING : This MySQL RPM is not an official Fedora/Redhat build and it
overrides the official one. Don't file bugs on Fedora Project nor Redhat.
Use dedicated forums http://forums.famillecollet.com/

Updating : php-mysql-5.3.11-1.el6.remi.x86_64 4/63
Updating : mysql-5.5.23-1.el6.remi.x86_64 5/63
Updating : php-cli-5.3.11-1.el6.remi.x86_64 6/63
Installing : php-5.3.11-1.el6.remi.x86_64 7/63
Updating : php-mbstring-5.3.11-1.el6.remi.x86_64 8/63
Installing : t1lib-5.1.2-6.el6_2.1.x86_64 9/63
Updating : php-gd-5.3.11-1.el6.remi.x86_64 10/63
Installing : libmcrypt-2.5.8-9.el6.x86_64 11/63
Installing : php-mcrypt-5.3.11-1.el6.remi.x86_64 12/63
Installing : libaio-0.3.107-10.el6.x86_64 13/63
Updating : mysql-server-5.5.23-1.el6.remi.x86_64 14/63
Installing : phpMyAdmin-3.5.0-1.el6.remi.noarch 15/63
Updating : php-devel-5.3.11-1.el6.remi.x86_64 16/63
Updating : php-odbc-5.3.11-1.el6.remi.x86_64 17/63
Updating : php-pgsql-5.3.11-1.el6.remi.x86_64 18/63
Updating : php-soap-5.3.11-1.el6.remi.x86_64 19/63
Updating : php-bcmath-5.3.11-1.el6.remi.x86_64 20/63
Updating : php-tidy-5.3.11-1.el6.remi.x86_64 21/63
Updating : php-xml-5.3.11-1.el6.remi.x86_64 22/63
Updating : php-xmlrpc-5.3.11-1.el6.remi.x86_64 23/63
Updating : php-embedded-5.3.11-1.el6.remi.x86_64 24/63
Updating : php-dba-5.3.11-1.el6.remi.x86_64 25/63
Updating : php-snmp-5.3.11-1.el6.remi.x86_64 26/63
Updating : php-process-5.3.11-1.el6.remi.x86_64 27/63
Updating : php-recode-5.3.11-1.el6.remi.x86_64 28/63
Updating : php-ldap-5.3.11-1.el6.remi.x86_64 29/63
Updating : php-imap-5.3.11-1.el6.remi.x86_64 30/63
Updating : php-pspell-5.3.11-1.el6.remi.x86_64 31/63
Updating : php-intl-5.3.11-1.el6.remi.x86_64 32/63
Updating : php-enchant-5.3.11-1.el6.remi.x86_64 33/63
Installing : compat-mysql51-5.1.54-1.el6.remi.x86_64 34/63
Cleanup : php-devel-5.3.3-3.el6_2.6.x86_64 35/63
Cleanup : php-mysql-5.3.3-3.el6_2.6.x86_64 36/63
Cleanup : php-5.3.3-3.el6_2.6.x86_64 37/63
Cleanup : php-pgsql-5.3.3-3.el6_2.6.x86_64 38/63
Cleanup : mysql-server-5.1.61-1.el6_2.1.x86_64 39/63
Cleanup : php-odbc-5.3.3-3.el6_2.6.x86_64 40/63
Cleanup : php-pdo-5.3.3-3.el6_2.6.x86_64 41/63
Cleanup : mysql-5.1.61-1.el6_2.1.x86_64 42/63
Cleanup : php-cli-5.3.3-3.el6_2.6.x86_64 43/63
Cleanup : php-mbstring-5.3.3-3.el6_2.6.x86_64 44/63
Cleanup : php-enchant-5.3.3-3.el6_2.6.x86_64 45/63
Cleanup : php-intl-5.3.3-3.el6_2.6.x86_64 46/63
Cleanup : php-pspell-5.3.3-3.el6_2.6.x86_64 47/63
Cleanup : php-imap-5.3.3-3.el6_2.6.x86_64 48/63
Cleanup : php-ldap-5.3.3-3.el6_2.6.x86_64 49/63
Cleanup : php-recode-5.3.3-3.el6_2.6.x86_64 50/63
Erasing : php-zts-5.3.3-3.el6_2.6.x86_64 51/63
Cleanup : php-process-5.3.3-3.el6_2.6.x86_64 52/63
Cleanup : php-snmp-5.3.3-3.el6_2.6.x86_64 53/63
Cleanup : php-gd-5.3.3-3.el6_2.6.x86_64 54/63
Cleanup : php-dba-5.3.3-3.el6_2.6.x86_64 55/63
Cleanup : php-embedded-5.3.3-3.el6_2.6.x86_64 56/63
Cleanup : php-xmlrpc-5.3.3-3.el6_2.6.x86_64 57/63
Cleanup : php-xml-5.3.3-3.el6_2.6.x86_64 58/63
Cleanup : php-tidy-5.3.3-3.el6_2.6.x86_64 59/63
Cleanup : php-bcmath-5.3.3-3.el6_2.6.x86_64 60/63
Cleanup : php-soap-5.3.3-3.el6_2.6.x86_64 61/63
Cleanup : php-common-5.3.3-3.el6_2.6.x86_64 62/63
Cleanup : mysql-libs-5.1.61-1.el6_2.1.x86_64 63/63

Installed:
php.x86_64 0:5.3.11-1.el6.remi phpMyAdmin.noarch 0:3.5.0-1.el6.remi

Dependency Installed:
compat-mysql51.x86_64 0:5.1.54-1.el6.remi
libaio.x86_64 0:0.3.107-10.el6
libmcrypt.x86_64 0:2.5.8-9.el6
php-mcrypt.x86_64 0:5.3.11-1.el6.remi
t1lib.x86_64 0:5.1.2-6.el6_2.1

Dependency Updated:
mysql.x86_64 0:5.5.23-1.el6.remi
mysql-libs.x86_64 0:5.5.23-1.el6.remi
mysql-server.x86_64 0:5.5.23-1.el6.remi
php-bcmath.x86_64 0:5.3.11-1.el6.remi
php-cli.x86_64 0:5.3.11-1.el6.remi
php-common.x86_64 0:5.3.11-1.el6.remi
php-dba.x86_64 0:5.3.11-1.el6.remi
php-devel.x86_64 0:5.3.11-1.el6.remi
php-embedded.x86_64 0:5.3.11-1.el6.remi
php-enchant.x86_64 0:5.3.11-1.el6.remi
php-gd.x86_64 0:5.3.11-1.el6.remi
php-imap.x86_64 0:5.3.11-1.el6.remi
php-intl.x86_64 0:5.3.11-1.el6.remi
php-ldap.x86_64 0:5.3.11-1.el6.remi
php-mbstring.x86_64 0:5.3.11-1.el6.remi
php-mysql.x86_64 0:5.3.11-1.el6.remi
php-odbc.x86_64 0:5.3.11-1.el6.remi
php-pdo.x86_64 0:5.3.11-1.el6.remi
php-pgsql.x86_64 0:5.3.11-1.el6.remi
php-process.x86_64 0:5.3.11-1.el6.remi
php-pspell.x86_64 0:5.3.11-1.el6.remi
php-recode.x86_64 0:5.3.11-1.el6.remi
php-snmp.x86_64 0:5.3.11-1.el6.remi
php-soap.x86_64 0:5.3.11-1.el6.remi
php-tidy.x86_64 0:5.3.11-1.el6.remi
php-xml.x86_64 0:5.3.11-1.el6.remi
php-xmlrpc.x86_64 0:5.3.11-1.el6.remi

Replaced:
php-zts.x86_64 0:5.3.3-3.el6_2.6

Complete!
[root@linggih ~]#
[/bash]

Setting database phpMyAdmin



Ketikkan command mysql -u root. Jika keluar pesan error "ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)" berarti user root sudah ada, pakai command mysql -u root -p. Kemudian ketikkan password root.

Jika anda install phpMyAdmin ini pada fresh install OS (Minimal Install), buat user root terlebih dahulu dengan command:


  1. mysql -u root

  2. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('passwordroot');. Ganti passwordroot dengan password root anda.

  3. Tekan tombol Ctrl + C atau ketikkan exit untuk keluar



[bash autolinks="true"]
[root@linggih ~]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('passwordroot');
Query OK, 0 rows affected (0.00 sec)

mysql>

mysql> Ctrl-C -- exit!
Aborted
[root@linggih ~]#
[/bash]

Buat database phpMyAdmin



Command:


  1. mysql -u root -p. Kemudian ketikkan password root

  2. CREATE DATABASE phpmyadmin; → buat database phpmyadmin

  3. Tekan tombol Ctrl + C atau ketikkan exit untuk keluar



[bash autolinks="true"]
[root@linggih ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.23 MySQL Community Server (GPL) by Remi

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE phpmyadmin;
Query OK, 1 row affected (0.00 sec)

mysql> exit
Bye
[root@linggih ~]#
[/bash]

Control-User



Setting pma user dan grant akses ke database phpmyadmin

Command:


  1. mysql -u root -p, kemudian ketikkan password root.

  2. CREATE USER 'pma'@'localhost' IDENTIFIED BY 'pmapass';. Setting user permission (pma) @ localhost, user password pmapass

  3. GRANT ALL PRIVILEGES ON phpmyadmin.* to pma@localhost;. Setting all privileges database permission (phpmyadmin) oleh user pma @ localhost

  4. Tekan tombol Ctrl + C atau ketikkan exit untuk keluar



[bash autolinks="true"]
[root@linggih phpMyAdmin]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.5.23 MySQL Community Server (GPL) by Remi

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE USER 'pma'@'localhost' IDENTIFIED BY 'pmapass';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON phpmyadmin.* to pma@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
[root@linggih phpMyAdmin]#
[/bash]

Import Table



Import (execute) create_tables.sql pada direktori "/usr/share/phpMyAdmin/examples/" ke database phpmyadmin.

Command:


  1. mysql -u pma -p -h localhost phpmyadmin < /usr/share/phpMyAdmin/examples/create_tables.sql

  2. Ketikkan password user pma (password default pmapass), tekan enter



[bash autolinks="true"]
[root@linggih phpMyAdmin]# mysql -u pma -p -h localhost phpmyadmin < /usr/share/phpMyAdmin/examples/create_tables.sql
Enter password:
[root@linggih phpMyAdmin]#
[/bash]

Edit File Konfigurasi



Copy file konfigurasi phpMyAdmin "config.sample.inc.php" dengan nama "config.inc.php".

[bash autolinks="true"]
[root@linggih ~]# cd /usr/share/phpMyAdmin
[root@linggih phpMyAdmin]# cp config.sample.inc.php config.inc.php
[root@linggih phpMyAdmin]#
[/bash]

blowfish_secret

Edit blowfish_secret pada file config.inc.php (/usr/share/phpMyAdmin/config.inc.php).

[php autolinks="true"]
$cfg['blowfish_secret'] = 'NV_jqqx5{3hdi[=$jAv)8eUHdxlNzU0UBfFnFY8#_$R++'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
[/php]

Jika anda tidak tahu, bisa copy paste via blowfish_secret generator di sini.

[caption id="attachment_773" align="alignnone" width="229" caption="Blowfish Secret Generator"]Blowfish Secret Generator[/caption]

Set auth_type ke "cookie"

[php autolinks="true"]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
[/php]

Enable advanced features pada file konfigurasi seperti contoh di bawah. Uncomment dua garis miring (//):

[php autolinks="true"]
/*
* phpMyAdmin configuration storage settings.
*/

/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = 'localhost';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';

/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
[/php]

Buka file /etc/httpd/conf.d/phpMyAdmin.conf, kemudian edit deny from all ke allow from all untuk menghindari pesan Error "Forbidden (You don't have permission to access /phpmyadmin on this server.)".

[apache autolinks="true"]
<Directory /usr/share/phpMyAdmin/>
order deny,allow
allow from all
allow from 127.0.0.1
allow from ::1
</Directory>
[/apache]

Restart Apache Web Server

Restart Apache Web Server, ketikkan command service httpd restart atau /etc/init.d/httpd restart

[bash autolinks="true"]
[root@linggih ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@linggih ~]#
[/bash]

Test phpMyAdmin



buka halaman main index/phpmyadmin (http://domain-anda.com/phpmyadmin) pada web browser. Jika phpMyAdmin sukses terinstall, anda akan diminta memasukkan detail user login. Masukkan username dan password root, kemudian klik tombol Go.

[caption id="attachment_774" align="alignnone" width="300" caption="phpMyAdmin Login Screen"]phpMyAdmin Login Screen[/caption]

Jika otentikasi login sukses, anda akan diarahkan pada halaman utama phpMyAdmin.

[caption id="attachment_775" align="alignnone" width="300" caption="phpMyAdmin Main Page"]phpMyAdmin Main Page[/caption]

Selesai. Semoga bermanfaat.
:D

referensi:

http://wiki.phpmyadmin.net/pma/Welcome_to_phpMyAdmin_Wiki
29 April 2012

Install MySQL Server Pada CentOS

MySQL Database Server merupakan database web hosting yang digunakan untuk menyimpan berbagai macam data informasi seperti blog post, detail informasi user, comment dlsb. MySQL merupakan database server yang paling populer dan banyak digunakan oleh webmaster saat ini, dikarenakan selain gratis namun juga sangat fleksibel dan mampu handle berbagai macam tipe dinamic web (PHP, ASP, Perl dlsb).

Install MySQL Database Pada OS CentOS

Berikut cara simpel install MySQL Database Server pada CentOS:. Ketikkan command yum install mysql-server mysql php-mysql



[root@server5 ~]# yum install mysql-server mysql php-mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.biz.net.id
* extras: centos.biz.net.id
* updates: mirror.averse.net
Setting up Install Process
Package mysql-5.1.61-1.el6_2.1.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package mysql-server.x86_64 0:5.1.61-1.el6_2.1 will be installed
--> Processing Dependency: perl-DBI for package: mysql-server-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.61-1.el6_2.1.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.61-1.el6_2.1.x86_64
---> Package php-mysql.x86_64 0:5.3.3-3.el6_2.6 will be installed
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-mysql-5.3.3-3.el6_2.6.x86_64
--> Processing Dependency: php-pdo for package: php-mysql-5.3.3-3.el6_2.6.x86_64
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
---> Package php-common.x86_64 0:5.3.3-3.el6_2.6 will be installed
---> Package php-pdo.x86_64 0:5.3.3-3.el6_2.6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package              Arch         Version                  Repository     Size
================================================================================
Installing:
mysql-server         x86_64       5.1.61-1.el6_2.1         updates       8.1 M
php-mysql            x86_64       5.3.3-3.el6_2.6          updates        79 k
Installing for dependencies:
perl-DBD-MySQL       x86_64       4.013-3.el6              base          134 k
perl-DBI             x86_64       1.609-4.el6              base          705 k
php-common           x86_64       5.3.3-3.el6_2.6          updates       522 k
php-pdo              x86_64       5.3.3-3.el6_2.6          updates        73 k

Transaction Summary
================================================================================
Install       6 Package(s)

Total download size: 9.6 M
Installed size: 29 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): mysql-server-5.1.61-1.el6_2.1.x86_64.rpm          | 8.1 MB     00:35
http://centos.biz.net.id/6.2/os/x86_64/Packages/perl-DBD-MySQL-4.013-3.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
(2/6): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm             | 134 kB     00:00
(3/6): perl-DBI-1.609-4.el6.x86_64.rpm                   | 705 kB     00:03
(4/6): php-common-5.3.3-3.el6_2.6.x86_64.rpm             | 522 kB     00:02
(5/6): php-mysql-5.3.3-3.el6_2.6.x86_64.rpm              |  79 kB     00:00
(6/6): php-pdo-5.3.3-3.el6_2.6.x86_64.rpm                |  73 kB     00:00
--------------------------------------------------------------------------------
Total                                           225 kB/s | 9.6 MB     00:43
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : php-common-5.3.3-3.el6_2.6.x86_64                            1/6
Installing : perl-DBI-1.609-4.el6.x86_64                                  2/6
Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                            3/6
Installing : php-pdo-5.3.3-3.el6_2.6.x86_64                               4/6
Installing : php-mysql-5.3.3-3.el6_2.6.x86_64                             5/6
Installing : mysql-server-5.1.61-1.el6_2.1.x86_64                         6/6

Installed:
mysql-server.x86_64 0:5.1.61-1.el6_2.1   php-mysql.x86_64 0:5.3.3-3.el6_2.6

Dependency Installed:
perl-DBD-MySQL.x86_64 0:4.013-3.el6      perl-DBI.x86_64 0:1.609-4.el6
php-common.x86_64 0:5.3.3-3.el6_2.6      php-pdo.x86_64 0:5.3.3-3.el6_2.6

Complete!
[root@server5 ~]#

Untuk load MySQL service ketika mesin server boot (start up), ketikkan command berikut; chkconfig mysqld on



[root@server5 ~]# chkconfig mysqld on
[root@server5 ~]#

Jalankan MySQL Dengan Command; service mysqld start



[root@server5 ~]# service mysqld start
Initializing MySQL database:  WARNING: The host 'server5' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
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/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h server5 password 'new-password'

Alternatively you can run:
/usr/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 ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

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

[  OK  ]
Starting mysqld:                                           [  OK  ]
[root@server5 ~]#

Set password MySQL root; ketikkan command; mysql -u root. Jika selesai, tekan tombol "Ctrl + C" untuk keluar.



[root@server5 ~]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('testingpassword');
Query OK, 0 rows affected (0.00 sec)

mysql> SET PASSWORD FOR 'root'@'server5' = PASSWORD('testingpassword');
Query OK, 0 rows affected (0.00 sec)

mysql> SET PASSWORD FOR 'root'@'127.0.0.1' = PASSWORD('testingpassword');
Query OK, 0 rows affected (0.00 sec)

mysql>

mysql> Ctrl-C -- exit!
Aborted
[root@server5 ~]#

Untuk cek versi MySQL, ketikkan command mysql --version



[root@server5 ~]# mysql --version
mysql  Ver 14.14 Distrib 5.1.61, for redhat-linux-gnu (x86_64) using readline 5.1
[root@server5 ~]#

Selesai. Semoga bermanfaat.
:)
17 Maret 2012

Install Plugin cPanel/WHM "WatchMySQL"

Plugin ini memberikan kemudahan kepada administrator untuk memonitor semua script/situs user yang terkoneksi ke MySQL. WatchMySQL plugin dapat disetting/dikonfigurasikan untuk mengirimkan email pemberitahuan/notifikasi kepada administrator dan/atau user jika script/situs user melebihi batas (limit) koneksi ke MySQL. Plugin ini juga dapat dikonfigurasikan untuk memutus koneksi user yang melampaui batas maksimal koneksi ke MySQL database secara otomatis.

Berikut cara install WatchMySQL plugin pada cPanel/WHM Server:

[bash collapse="false"]
[root@server5 ~]# cd /home
[root@server5 home]#
[/bash]

[bash collapse="false"]
[root@server5 home]# rm -f latest-watchmysql
[root@server5 home]#
[/bash]

[bash]
[root@server5 home]# wget http://www.ndchost.com/cpanel-whm/plugins/watchmysql/download.php
--2012-05-27 12:30:08-- http://www.ndchost.com/cpanel-whm/plugins/watchmysql/download.php
Resolving www.ndchost.com... 204.10.36.37
Connecting to www.ndchost.com|204.10.36.37|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.ndchost.com/watchmysql/latest-watchmysql [following]
--2012-05-27 12:30:09-- http://download.ndchost.com/watchmysql/latest-watchmysql
Resolving download.ndchost.com... 204.10.39.137
Connecting to download.ndchost.com|204.10.39.137|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 32551 (32K) [text/plain]
Saving to: `latest-watchmysql'

100%[======================================>] 32,551 26.6K/s in 1.2s

2012-05-27 12:30:11 (26.6 KB/s) - `latest-watchmysql' saved [32551/32551]

[root@server5 home]#
[/bash]

[bash]
[root@server5 home]# sh latest-watchmysql
Creating directory installd-watchmysql
Verifying archive integrity... All good.
Uncompressing WatchMySQL by NDCHost.com....................................
Detected CentOS release 5.8 (Final) Operating System
Installing watchmysql daemon into /usr/sbin/
Installing default watchmysql.config into /etc/
Detected Redhat Style OS, Installing init script
WatchMySQL installation has completed, you should now edit the /etc/watchmysql.config file before starting the watchmysql service
[root@server5 home]#
[/bash]

Visit Publisher Script
13 Juli 2010

eBook Gratis: Dasar Pemrograman PHP dan MySQL

Loncat ke Atas ↑