<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cachak &#187; MySQL</title>
	<atom:link href="http://sahir.web.id/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://sahir.web.id</link>
	<description>cachak weblog</description>
	<lastBuildDate>Tue, 24 Nov 2009 07:24:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Install dan Konfigurasi phpMyAdmin</title>
		<link>http://sahir.web.id/2009/06/24/install-dan-konfigurasi-phpmyadmin/</link>
		<comments>http://sahir.web.id/2009/06/24/install-dan-konfigurasi-phpmyadmin/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 06:56:33 +0000</pubDate>
		<dc:creator>cachak</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[phpMyAdmin]]></category>
		<category><![CDATA[RPM]]></category>
		<category><![CDATA[Yum]]></category>

		<guid isPermaLink="false">http://sahir.web.id/?p=59</guid>
		<description><![CDATA[Tutorial untuk install phpMyAdmin dari rpm dan mengkonfigurasi nya sehingga bisa di akses http://host/phpMyAdmin/

1.Install paket phpMyAdmin


[root@cachak-dev ~]# yum install phpMyAdmin
Loaded plugins: fastestmirror
Repository epel is listed more than once in the configuration
Determining fastest mirrors
epel                       [...]]]></description>
			<content:encoded><![CDATA[<p>Tutorial untuk install phpMyAdmin dari rpm dan mengkonfigurasi nya sehingga bisa di akses http://host/phpMyAdmin/<br />
<span id="more-59"></span><br />
1.Install paket phpMyAdmin<br />
<code></p>
<pre>
[root@cachak-dev ~]# yum install phpMyAdmin
Loaded plugins: fastestmirror
Repository epel is listed more than once in the configuration
Determining fastest mirrors
epel                                                      | 2.1 kB     00:00
primary.sqlite.bz2                                        | 2.6 MB     00:27
myindo                                                    |  951 B     00:00
primary.xml.gz                                            | 3.4 kB     00:00
myindo                                                         2/2
base                                                      | 1.1 kB     00:00
primary.xml.gz                                            | 878 kB     00:13
base                                                           2508/2508
updates                                                   |  951 B     00:00
primary.xml.gz                                            | 185 kB     00:02
updates                                                        287/287
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:2.11.9.5-1.el5 set to be updated
--> Processing Dependency: php-mysql >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php-mbstring >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: webserver for package: phpMyAdmin
--> Running transaction check
---> Package php-mbstring.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-common = 5.1.6-23.2.el5_3 for package: php-mbstring
---> Package php-mysql.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-pdo for package: php-mysql
---> Package php.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-cli = 5.1.6-23.2.el5_3 for package: php
--> Processing Dependency: libcurl.so.3 for package: php
--> Processing Dependency: libaspell.so.15 for package: php
--> Processing Dependency: libgmp.so.3 for package: php
--> Processing Dependency: libidn.so.11 for package: php
--> Processing Dependency: libpspell.so.15 for package: php
---> Package httpd.i386 0:2.2.3-22.el5.centos.1 set to be updated
filelists.sqlite.bz2                                      | 4.0 MB     00:43
filelists.xml.gz                                          | 1.4 kB     00:00
filelists.xml.gz                                          | 2.8 MB     00:29
filelists.xml.gz                                          | 1.3 MB     00:13
--> Processing Dependency: libaprutil-1.so.0 for package: httpd
--> Processing Dependency: libapr-1.so.0 for package: httpd
--> Processing Dependency: /etc/mime.types for package: httpd
--> Running transaction check
---> Package libidn.i386 0:0.6.5-1.1 set to be updated
---> Package php-pdo.i386 0:5.1.6-23.2.el5_3 set to be updated
---> Package curl.i386 0:7.15.5-2.1.el5_3.4 set to be updated
---> Package apr-util.i386 0:1.2.7-7.el5_3.1 set to be updated
---> Package mailcap.noarch 0:2.1.23-1.fc6 set to be updated
---> Package php-cli.i386 0:5.1.6-23.2.el5_3 set to be updated
---> Package php-common.i386 0:5.1.6-23.2.el5_3 set to be updated
---> Package apr.i386 0:1.2.7-11 set to be updated
---> Package gmp.i386 0:4.1.4-10.el5 set to be updated
---> Package aspell.i386 12:0.60.3-7.1 set to be updated
--> Processing Dependency: aspell-en for package: aspell
--> Running transaction check
---> Package aspell-en.i386 50:6.0-2.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================
 Package            Arch         Version                     Repository     Size
=================================================================================
Installing:
 phpMyAdmin         noarch       2.11.9.5-1.el5              epel          4.2 M
Installing for dependencies:
 apr                i386         1.2.7-11                    base          122 k
 apr-util           i386         1.2.7-7.el5_3.1             updates        76 k
 aspell             i386         12:0.60.3-7.1               base          936 k
 aspell-en          i386         50:6.0-2.1                  base          1.6 M
 curl               i386         7.15.5-2.1.el5_3.4          updates       232 k
 gmp                i386         4.1.4-10.el5                base          664 k
 httpd              i386         2.2.3-22.el5.centos.1       updates       1.2 M
 libidn             i386         0.6.5-1.1                   base          194 k
 mailcap            noarch       2.1.23-1.fc6                base           14 k
 php                i386         5.1.6-23.2.el5_3            updates       1.1 M
 php-cli            i386         5.1.6-23.2.el5_3            updates       2.1 M
 php-common         i386         5.1.6-23.2.el5_3            updates       151 k
 php-mbstring       i386         5.1.6-23.2.el5_3            updates       994 k
 php-mysql          i386         5.1.6-23.2.el5_3            updates        85 k
 php-pdo            i386         5.1.6-23.2.el5_3            updates        64 k

Transaction Summary
=================================================================================
Install     16 Package(s)
Update       0 Package(s)
Remove       0 Package(s)         

Total download size: 14 M
Is this ok [y/N]: y
Downloading Packages:
(1/16): mailcap-2.1.23-1.fc6.noarch.rpm                   |  14 kB     00:00
(2/16): php-pdo-5.1.6-23.2.el5_3.i386.rpm                 |  64 kB     00:00
(3/16): apr-util-1.2.7-7.el5_3.1.i386.rpm                 |  76 kB     00:00
(4/16): php-mysql-5.1.6-23.2.el5_3.i386.rpm               |  85 kB     00:00
(5/16): apr-1.2.7-11.i386.rpm                             | 122 kB     00:04
(6/16): php-common-5.1.6-23.2.el5_3.i386.rpm              | 151 kB     00:01
(7/16): libidn-0.6.5-1.1.i386.rpm                         | 194 kB     00:01
(8/16): curl-7.15.5-2.1.el5_3.4.i386.rpm                  | 232 kB     00:02
(9/16): gmp-4.1.4-10.el5.i386.rpm                         | 664 kB     00:09
(10/16): aspell-0.60.3-7.1.i386.rpm                       | 936 kB     00:10
(11/16): php-mbstring-5.1.6-23.2.el5_3.i386.rpm           | 994 kB     00:11
(12/16): php-5.1.6-23.2.el5_3.i386.rpm                    | 1.1 MB     00:13
(13/16): httpd-2.2.3-22.el5.centos.1.i386.rpm             | 1.2 MB     00:14
(14/16): aspell-en-6.0-2.1.i386.rpm                       | 1.6 MB     00:16
(15/16): php-cli-5.1.6-23.2.el5_3.i386.rpm                | 2.1 MB     00:29
(16/16): phpMyAdmin-2.11.9.5-1.el5.noarch.rpm             | 4.2 MB     00:57
---------------------------------------------------------------------------------
Total                                             78 kB/s |  14 MB     02:58
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : mailcap                                         [ 1/16]
  Installing     : php-common                                      [ 2/16]
  Installing     : libidn                                          [ 3/16]
  Installing     : curl                                            [ 4/16]
  Installing     : apr                                             [ 5/16]
  Installing     : gmp                                             [ 6/16]
  Installing     : apr-util                                        [ 7/16]
  Installing     : httpd                                           [ 8/16]
  Installing     : php-mbstring                                    [ 9/16]
  Installing     : php-pdo                                         [10/16]
  Installing     : php-mysql                                       [11/16]
  Installing     : aspell-en                                       [12/16]
  Installing     : aspell                                          [13/16]
  Installing     : php-cli                                         [14/16]
  Installing     : php                                             [15/16]
  Installing     : phpMyAdmin                                      [16/16] 

Installed: phpMyAdmin.noarch 0:2.11.9.5-1.el5
Dependency Installed: apr.i386 0:1.2.7-11 apr-util.i386 0:1.2.7-7.el5_3.1 aspell.i386 12:0.60.3-7.1 aspell-en.i386 50:6.0-2.1 curl.i386 0:7.15.5-2.1.el5_3.4 gmp.i386 0:4.1.4-10.el5 httpd.i386 0:2.2.3-22.el5.centos.1 libidn.i386 0:0.6.5-1.1 mailcap.noarch 0:2.1.23-1.fc6 php.i386 0:5.1.6-23.2.el5_3 php-cli.i386 0:5.1.6-23.2.el5_3 php-common.i386 0:5.1.6-23.2.el5_3 php-mbstring.i386 0:5.1.6-23.2.el5_3 php-mysql.i386 0:5.1.6-23.2.el5_3 php-pdo.i386 0:5.1.6-23.2.el5_3
Complete!
[root@cachak-dev ~]#
</pre>
<p></code><br />
diatas sebenarnya banyak yang harusnya gak ikut keinstall apabila sudah ke install, misalnya httpd<br />
setelah itu jangan lupa install php-mcrypt<br />
<code></p>
<pre>
[root@cachak-dev ~]# yum install php-mcrypt
Loaded plugins: fastestmirror
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.i386 0:5.1.6-5.el5 set to be updated
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt
--> Running transaction check
---> Package libmcrypt.i386 0:2.5.7-5.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================
 Package              Arch           Version                Repository      Size
=================================================================================
Installing:
 php-mcrypt           i386           5.1.6-5.el5            epel            16 k
Installing for dependencies:
 libmcrypt            i386           2.5.7-5.el5            epel           124 k

Transaction Summary
=================================================================================
Install      2 Package(s)
Update       0 Package(s)
Remove       0 Package(s)         

Total download size: 140 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): php-mcrypt-5.1.6-5.el5.i386.rpm                    |  16 kB     00:00
(2/2): libmcrypt-2.5.7-5.el5.i386.rpm                     | 124 kB     00:01
---------------------------------------------------------------------------------
Total                                             62 kB/s | 140 kB     00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : libmcrypt                                         [1/2]
  Installing     : php-mcrypt                                        [2/2] 

Installed: php-mcrypt.i386 0:5.1.6-5.el5
Dependency Installed: libmcrypt.i386 0:2.5.7-5.el5
Complete!
[root@cachak-dev ~]#
</pre>
<p></code><br />
2.Konfigurasi phpMyAdmin<br />
Lakukan edit file /etc/httpd/conf.d/phpMyAdmin.conf<br />
dari :<br />
<code>
<pre>
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<directory /usr/share/phpMyAdmin/>
   order deny,allow
   deny from all
   allow from 127.0.0.1

# This directory does not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<directory /usr/share/phpMyAdmin/libraries>
    Order Deny,Allow
    Deny from All
    Allow from None
</directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc.  This may break your mod_security implementation.
#
#<ifmodule mod_security.c>
#    <directory /usr/share/phpMyAdmin>
#        SecRuleInheritance Off
#    </directory>
#</ifmodule>
</pre>
<p></code><br />
Menjadi<br />
<code>
<pre>
[root@cachak-dev ~]# cat /etc/httpd/conf.d/phpMyAdmin.conf
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
<directory /usr/share/phpMyAdmin/>
   order deny,allow
   #deny from all
   #allow from 127.0.0.1

# This directory does not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<directory /usr/share/phpMyAdmin/libraries>
    Order Deny,Allow
    Deny from All
    Allow from None
</directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc.  This may break your mod_security implementation.
#
#<ifmodule mod_security.c>
#    <directory /usr/share/phpMyAdmin>
#        SecRuleInheritance Off
#    </directory>
#</ifmodule>
[root@cachak-dev ~]#
</pre>
<p></code><br />
disini saya hanya ngedit bagian<br />
<code>   #deny from all<br />
   #allow from 127.0.0.1</code><br />
artinya diallowed dari semua ip, untuk allowed dari ip tertentu, misalnya ip 202.xxx.xxx.10 maka menjadi<br />
<code>   deny from all<br />
   allow from 202.xxx.xxx.10</code><br />
setelah itu restart httpd<br />
<code>
<pre>[root@cachak-dev ~]# /etc/init.d/httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@cachak-dev ~]#
</pre>
<p></code><br />
setelah itu setting phpMyAdmin.conf di /etc/phpMyAdmin/config.inc.php<br />
dibawah $i = 0 tambahkan $cfg['blowfish_secret'] = &#8216;H1PvIjBDbw&#8217;; sehingga menjadi :<br />
<code>$i = 0;<br />
$cfg['blowfish_secret'] = 'H1PvIjBDbw';</code><br />
terus rubah<br />
<code>$cfg['Servers'][$i]['auth_type']     = 'http'; </code><br />
menjadi :<br />
<code>$cfg['Servers'][$i]['auth_type']     = 'cookie'; </code><br />
setelah itu save<br />
setelah itu tinggal http://host/phpMyAdmin</p>
]]></content:encoded>
			<wfw:commentRss>http://sahir.web.id/2009/06/24/install-dan-konfigurasi-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Restore Password MySQL</title>
		<link>http://sahir.web.id/2005/09/21/restore-password-mysql/</link>
		<comments>http://sahir.web.id/2005/09/21/restore-password-mysql/#comments</comments>
		<pubDate>Wed, 21 Sep 2005 16:36:05 +0000</pubDate>
		<dc:creator>cachak</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://sahir.dozer.or.id/wp/index.php/2005/09/21/restor-password-mysql/</guid>
		<description><![CDATA[Tutorial Yang akan saya tulis ini adalah tutorial untuk menrestor password root mysql kalau kita lupa, dan saya mencobanya di linux fedora core, semoga bermanfaat buat semuanya.

1. login lah sebagai root (buka 2 console)
2. matikan service mysql

console1# /etc/init.d/mysqld stop

3. nyalakan service mysql dengan option &#8211;skip-grant-table,  perintah ini harus dijalankan sebagai user mysql

console2# su mysql
console2# [...]]]></description>
			<content:encoded><![CDATA[<p>Tutorial Yang akan saya tulis ini adalah tutorial untuk menrestor password root mysql kalau kita lupa, dan saya mencobanya di linux fedora core, semoga bermanfaat buat semuanya.<br />
<span id="more-29"></span><br />
1. login lah sebagai root (buka 2 console)<br />
2. matikan service mysql<br />
<code>
<pre>console1# /etc/init.d/mysqld stop</pre>
<p></code><br />
3. nyalakan service mysql dengan option &#8211;skip-grant-table,  perintah ini harus dijalankan sebagai user mysql<br />
<code>
<pre>console2# su mysql
console2# /usr/libexec/mysqld --skip-grant-table</pre>
<p></code><br />
4. jalankan mysql client<br />
<code>
<pre> console1# mysql</pre>
<p></code><br />
5. pilih database mysql<br />
<code>
<pre>mysql> use mysql;</pre>
<p></code><br />
6. ubah password root di dalam tabel user<br />
<code>
<pre>mysql> update user set Password=password('password_baruku')
where ((User like 'root') and (Host like 'localhost'));</pre>
<p></code><br />
7. flush privileges<br />
<code>
<pre>mysql> flush privileges;</pre>
<p></code><br />
8. matikan service mysql<br />
<code>
<pre>console1# killall mysqld</pre>
<p></code><br />
9. jalankan kembali service mysql<br />
<code>
<pre>console1# /etc/init.d/mysqld start</pre>
<p></code></p>
<p>Sumber : CVS Om Dheche <img src='http://sahir.web.id/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://sahir.web.id/2005/09/21/restore-password-mysql/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
