/* ========================================================
NAME : Linux_Centos_APM_Install
DATE : 2019.02.05
E-MAIL : rf114@daum.net
URL : http://www.rf114.com

[LISENCE]
This program is free web source from RF114.com
This is not commercial lisence and as modify as possiable
to this contents include.
[SITE]
https://aeac.tistory.com/21
======================================================== */
¹æÈ­º®
----------------------------------------------------------- 

/etc/firewalld/zones/public.xml 

<?xml version="1.0" encoding="utf-8"?>

<zone>
  <short>Public</short>
  <description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accept
ed.</description>
  <service name="dhcpv6-client"/>
  <service name="http"/>
  <service name="ssh"/>
  <service name="https"/>
</zone>

firewall-cmd --reload

-----------------------------------------------------------
¡á [APM] Apache, PHP7, MariaDB 10.1 Install(¼³Ä¡) Guide
-----------------------------------------------------------
1. ÀÇÁ¸¼º ¶óÀÌºê·¯¸® ¼³Ä¡
-----------------------------------------------------------
¡à ¾Æ·¡´Â ¶óÀÌºê·¯¸®°¡ ¼³Ä¡µÇ¾îÀÖ´ÂÁö È®ÀÎÇØº¸´Â ºÎºÐÀÌ¸ç APM¿¡ ²À ÇÊ¿äÇÑ ÆÐÅ°Áö°¡ ÀÖ½À´Ï´Ù.
-----------------------------------------------------------
[root@localhost ~]# rpm -qa libjpeg* libpng* freetype* gd-* gcc gcc-c++ gdbm-devel libtermcap-devel
libpng-1.5.13-7.el7_2.x86_64
gcc-c++-4.8.5-11.el7.x86_64
freetype-2.4.11-12.el7.x86_64
libjpeg-turbo-1.2.90-5.el7.x86_64
libpng12-1.2.50-10.el7.x86_64
gcc-4.8.5-11.el7.x86_64

-----------------------------------------------------------
¡à Yum À¸·Î ¾Æ·¡ÀÇ ÇÊ¿äÇÑ ¶óÀÌºê·¯¸®¸¦ ÇÑ¹ø¿¡ ÀüºÎ ¼³Ä¡ÇÕ´Ï´Ù.
   (ÇÑ¹ø¿¡ °ü·ÃµÈ ÀÇÁ¸¼ºµµ °°ÀÌ ¼³Ä¡°¡ µË´Ï´Ù.)
-----------------------------------------------------------
[root@localhost ~]# yum install libjpeg* libpng* freetype* gd-* gcc gcc-c++ gdbm-devel libtermcap-devel

-----------------------------------------------------------
2. [APM] Apache, PHP, MariaDB ¼³Ä¡ [¼ø¼­´Â : Apache, Maria, PHP ÁøÇà]
-----------------------------------------------------------
¡à ¾ÆÆÄÄ¡(Apache 2.4) ¼³Ä¡
-----------------------------------------------------------
[root@localhost ~]# yum install httpd

- ¸¶¸®¾Æ(Maria DB 10.1) ¼³Ä¡
- ¹èÆ÷»çÀÌÆ® : http://mariadb.org/
- ¹öÀüº° ¼ÂÆÃ¹æ¹ý : http://downloads.mariadb.org/mariadb/repositories/
- ¸ÕÀú Yum ÀúÀå¼Ò »ý¼º
[root@localhost ~]# vi /etc/yum.repos.d/MariaDB.repo

# MariaDB 10.1 CentOS repository list 
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
:wq (ÀúÀå)

[root@localhost ~]# yum install MariaDB-server MariaDB-client

-----------------------------------------------------------
¡à PHP 7 ¼³Ä¡
-----------------------------------------------------------
¸ÕÀú Yum ÀúÀå¼Ò »ý¼º
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

-----------------------------------------------------------
¡à ÀÌÈÄ ¼³Ä¡
-----------------------------------------------------------
yum install php70w

-----------------------------------------------------------
¡à °ü·Ã PHP7 ÆÐÅ°Áö ¼³Ä¡ (ÀÚÁÖ ¾²ÀÌ´Â°ÍÀ» °ñ¶óºÃ½À´Ï´Ù.)
-----------------------------------------------------------
[root@localhost ~]# yum install php70w-mysql php70w-pdo php70w-pgsql php70w-odbc php70w-mbstring php70w-mcrypt php70w-gd
[root@localhost ~]# yum install php70w-pear php70w-pdo_dblib php70w-pecl-imagick php70w-pecl-imagick-devel php70w-xml php70w-xmlrpc

´ÙÀ½ ¸í·É¾î·Î php7 °ü·Ã ÆÐÅ°Áö ¼³Ä¡ÇÒ¼ö ÀÖ´Â ¸®½ºÆ®µéÀ» È®ÀÎÇÒ¼ö ÀÖ½À´Ï´Ù. 
À§ ¼³Ä¡¿Ü¿¡ ÇÊ¿äÇÑ ÆÐÅ°Áö°¡ ÀÖ´Ù¸é Ãß°¡·Î ¼³Ä¡ÇÏ¸é µË´Ï´Ù.
yum search php70w

-----------------------------------------------------------
¡à ¼³Ä¡ È®ÀÎ ¹× ¹öÀüÈ®ÀÎ
-----------------------------------------------------------
httpd -v
mysql -V
 
-----------------------------------------------------------
¡á [APM] Apache, PHP, MariaDB config(¼³Á¤) ¹× ±¸µ¿
-----------------------------------------------------------
1. ¾ÆÆÄÄ¡(Apache) ¼³Á¤ ¹× ±¸µ¿
-----------------------------------------------------------
¡à ±âº»¼³Á¤
-----------------------------------------------------------
[root@localhost ~]# vi /etc/httpd/conf/httpd.conf
.
.
     62 # User/Group: The name (or #number) of the user/group to run httpd as.
     63 # It is usually good practice to create a dedicated user and group for
     64 # running httpd, as with most system services.
     65 #
     66 User nobody      (apache ¡æ nobody º¯°æ)
     67 Group nobody     (apache ¡æ nobody º¯°æ)
.
.
     93 # If your host doesn't have a registered DNS name, enter its IP address here.
     94 #
     95 #ServerName www.example.com:80
     96 ServerName 192.168.122.128:80   (µµ¸ÞÀÎ ¶Ç´Â ÇØ´ç¼­¹ö IP ÀÔ·Â Ãß°¡)
.
.
:wq (ÀúÀå)

[Âü°í]
¡á apache ¡æ nobody º¯°æ
ROOT ±ÇÇÑÀ¸·Î ½ÇÇàµÈ ¾ÆÆÄÄ¡ÀÇ ÇÏÀ§ ÇÁ·Î¼¼½º¸¦ ÀÌ°÷¿¡¼­ ÁöÁ¤ÇÑ »ç¿ëÀÚ·Î ½ÇÇàÇÑ´Ù´Â ÀÇ¹Ì, 
±âº»°ªÀ¸·Î apache ¶Ç´Â daemon À¸·Î µÇ¾îÀÖÁö¸¸ ´ëºÎºÐ nobody·Î º¯°æÇÏ¿© ÀÌ¿ëÇÑ´Ù. ¾à°£ º¸¾ÈÀûÀÎ ÀÇ¹Ì¸¦ Æ÷ÇÔ

¡á ServerName
ÀÚ±â ¼­¹ö°¡ ÀÌ µµ¸ÞÀÎÀ» »ç¿ëÇÑ´Ù´Â°ÍÀ» ¾Ë¸®±â À§ÇÑ ¼ö´Ü, ¿¹¸¦ µé¾î
ServerName www.test.com:80 ¡æ È¨ÆäÀÌÁö Á¢¼Ó½Ã ÇØ´ç µµ¸ÞÀÎ(http://www.test.com)À¸·Î ¿¬°á
ServerName 192.168.122.128:80 ¡æ È¨ÆäÀÌÁö Á¢¼Ó½Ã ÇØ´ç µµ¸ÞÀÎ((http://192.168.122.128)À¸·Î ¿¬°á (µµ¸ÞÀÎÀÌ ¾øÀ»°æ¿ì IP ÀÔ·Â)

¡á IP´Â ÀÚ±â¼­¹ö IP ¼ÂÆÃ
[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.223.129 (ÀÌºÎºÐ)  netmask 255.255.255.0  broadcast 192.168.223.255
-----------------------------------------------------------
¡à ¹æÈ­º® ¼³Á¤
-----------------------------------------------------------
; È¯°æ¼³Á¤ÀÌ ¿Ï·á°¡ µÇ¾úÀ¸´Ï À¥À» ¿­±âÀ§ÇØ¼± ¹æÈ­º® 80¹ø Æ÷Æ®¸¦ ¿ÀÇÂÇØ¾ßÇÕ´Ï´Ù.
; [root@localhost ~]# vi /etc/sysconfig/iptables

# sample configuration for iptables service
# you can edit this manually or use system-config-firewall
# please do not ask us to add additional ports/services to this default configuration
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 81 -j ACCEPT (Ãß°¡)
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
:wq (ÀúÀå)

[Âü°í]
¡á iptables ¿¡¼­ ¼ø¼­´Â ¸Å¿ì Áß¿äÇÕ´Ï´Ù. ÀÏ¹ÝÀûÀ¸·Î Àû¿ëµÇ´Â ¼ø¼­´Â À§¿¡¼­ºÎÅÍ ¾Æ·¡·Î ¼øÂ÷ÀûÀ¸·Î ÀÐ¾î¿É´Ï´Ù.
¿¹¸¦µé¾î Ãß°¡ÇÑ ¸Ç ¾Æ·¡ÀÇ ¶óÀÎÂÊ¿¡ Ãß°¡¸¦ ÇÏ°ÔµÇ¸é Àû¿ëÀÌ Á¤»óÀûÀ¸·Î ¾ÈµË´Ï´Ù.
ÀÌÇØ°¡ ¾ÈµÇ½Ç°æ¿ì´Â ½ºÅ©¸°¼¦ ±×´ë·Î µû¶óÁøÇàÇØÁÖ¼¼¿ä. ³ªÁß¿¡ º°µµ·Î iptables ¼³¸íÀ» ÇÏµµ·Ï ÇÏ°Ú½À´Ï´Ù.
-----------------------------------------------------------
¡à ¹æÈ­º® Àç½ÃÀÛ
-----------------------------------------------------------
; [root@localhost ~]# service iptables restart
; Redirecting to /bin/systemctl restart  iptables.service

-----------------------------------------------------------
¡à Àû¿ë È®ÀÎ
-----------------------------------------------------------
; iptables -vnL
[root@localhost ~]# iptables -nL

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:22
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:80  (È®ÀÎ¿Ï·á)
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
REJECT     all  --  0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

-----------------------------------------------------------
¡à ¾ÆÆÄÄ¡ ½ÃÀÛ
-----------------------------------------------------------
[root@localhost ~]# systemctl start httpd

-----------------------------------------------------------
¡à ºÎÆÃÈÄ ÀÚµ¿ ½ÇÇà ¼³Á¤
-----------------------------------------------------------
[root@localhost ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

-----------------------------------------------------------
¡à ºÎÆÃÈÄ ÀÚµ¿ ½ÇÇà ¼³Á¤(ÇØÁ¦)
-----------------------------------------------------------
[root@localhost ~]# systemctl disable httpd
Removed symlink /etc/systemd/system/multi-user.target.wants/httpd.service.

-----------------------------------------------------------
¡à Service ¸í·É¾î ÀÌ¿ë °¡´É
-----------------------------------------------------------
[root@localhost ~]# service httpd start(stop)

-----------------------------------------------------------
¡à ¾ÆÆÄÄ¡ ±¸µ¿ È®ÀÎ
-----------------------------------------------------------
[root@localhost ~]# ps -ef  | grep httpd
root      17652      1  0 13:46 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    17654  17652  0 13:46 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    17655  17652  0 13:46 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    17656  17652  0 13:46 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    17657  17652  0 13:46 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    17658  17652  0 13:46 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
root      17715   2983  0 13:51 pts/1    00:00:00 grep --color=auto httpd

-----------------------------------------------------------
2. PHP È¯°æ¼³Á¤ ¹× ±¸µ¿(°æ·Î)
-----------------------------------------------------------
¡à ±âº»¼³Á¤
-----------------------------------------------------------
[root@localhost ~]# vi /etc/httpd/conf/httpd.conf
.
.
    161 # DirectoryIndex: sets the file that Apache will serve if a directory
    162 # is requested.
    163 #
    164 <IfModule dir_module>
    165     DirectoryIndex index.html index.htm index.php (Ãß°¡)
    166 </IfModule>
.
.
    270     # AddType allows you to add to or override the MIME configuration
    271     # file specified in TypesConfig for specific file types.
    272     #
    273     #AddType application/x-gzip .tgz
    274     AddType application/x-httpd-php .php .html .htm .inc  (Ãß°¡)
    275     AddType application/x-httpd-php-source .phps  (Ãß°¡)
:wq (ÀúÀå)

[Âü°í]
¡á ½ÇÁ¦ PHPÈ¯°æ¼³Á¤À» °ü¸®ÇÏ´Â ÆÄÀÏÀº ¾Æ·¡ÀÇ °æ·ÎÀÔ´Ï´Ù.

[root@localhost ~]# vi /etc/php.ini

À§ httpd.conf ÂÊ¿¡ ¼ÂÆÃÇÏ´Â°Ç ¾ÆÆÄÄ¡¿¡ php °ü·Ã Ã³¸®¸¦ ÇÒ¼ö ÀÖ°Ô Ãß°¡¸¦ ÇÏ´Â ºÎºÐÀÔ´Ï´Ù. 
php.ini ÆÄÀÏ¼³Á¤Àº »ç¿ëÇÒ·Á´Â À¥È¯°æ¿¡ ¸Â°ÔÆ©´×À» ÇØ¾ßÇÏÁö¸¸ ÇöÀç´Â ±âº»¼ÂÆÃÀ¸·Î °©´Ï´Ù.
 ³ªÁß¿¡ µû·Î ¼³¸íÇÏµµ·Ï ÇÏ°Ú½À´Ï´Ù.

-----------------------------------------------------------
¡à PHP Àû¿ë
-----------------------------------------------------------
- Yum ¼³Ä¡½Ã html ¾÷·Îµå ±âº» µð·ºÅä¸®´Â ¾Æ·¡¿Í °°½À´Ï´Ù.
[root@localhost ~]# cd /var/www/html/

- ÇØ´ç °æ·Î¿¡¼­ PHPÀÇ Á¤º¸¸¦ º¸¿©ÁÖ´Â ÇÔ¼öÀÇ ÆÄÀÏÀ» ÇÏ³ª »ý¼ºÇÕ´Ï´Ù.
[root@localhost html]# vi /var/www/html/phpinfo.php

<?php phpinfo(); ?>
:wq (ÀúÀå)

[root@localhost html]# ls  (ÆÄÀÏ»ý¼º È®ÀÎ)
phpinfo.php

- PHP È¯°æ¼³Á¤À» Àû¿ëÇÏ±âÀ§ÇØ ¾ÆÆÄÄ¡(Apache)µµ ÇÑ¹ø Àç½ÃÀÛÀ» ÇÕ´Ï´Ù.
[root@localhost html]# service httpd restart
Redirecting to /bin/systemctl restart  httpd.service

- Ç×»ó ¾ÆÆÄÄ¡(Apache) ±¸µ¿ÀÌ Á¦´ë·Î µÇ°í ÀÖ´ÂÁö È®ÀÎÇÕ´Ï´Ù.
[root@localhost html]# ps -ef | grep httpd
root      18135      1  0 16:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    18137  18135  0 16:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    18138  18135  0 16:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    18139  18135  0 16:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    18140  18135  0 16:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache    18141  18135  0 16:57 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
root      18143   2983  0 16:58 pts/1    00:00:00 grep --color=auto httpd

-----------------------------------------------------------
¡à PHP Àû¿ë È®ÀÎ Å×½ºÆ®
-----------------------------------------------------------
URL : http://192.168.223.129/phpinfo.php

-----------------------------------------------------------
3. Maria DB ±¸µ¿ ¹× ¼³Á¤
-----------------------------------------------------------
¡à Maria DB ±¸µ¿ ¹× ±¸µ¿ È®ÀÎ
-----------------------------------------------------------
[root@localhost ~]# systemctl start mariadb
[root@localhost ~]# ps -ef | grep mysql
mysql     41093      1  1 19:48 ?        00:00:00 /usr/sbin/mysqld
root      41130  11663  0 19:49 pts/1    00:00:00 grep --color=auto mysql

-----------------------------------------------------------
¡à Maria DB ±âº»¼³Á¤ (DB°¡ ±¸µ¿µÈ »óÅÂ¿¡¼­ ÁøÇà°¡´É)
-----------------------------------------------------------
[root@localhost ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): ÆÐ½º¿öµå°¡ ¾ø±â¶§¹®¿¡ ¿£ÅÍ

OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y   (DB ROOT ÆÐ½º¿öµå ¼³Á¤)
New password: ÆÐ½º¿öµåÀÔ·Â
Re-enter new password: ÀçÈ®ÀÎ ÆÐ½º¿öµåÀÔ·Â
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y  (ÀÍ¸íÀÇ Á¢±ÙÀ» ¸·À»°ÍÀÎÁö? º¸¾ÈÀ» À§ÇØ Y ¿£ÅÍ)
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y (DB ROOT ¿ø°ÝÀ» ¸·À»°ÍÀÎÁö? º¸¾ÈÀ» À§ÇØ Y ¿£ÅÍ)

 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y (Test ¿ëÀ¸·Î »ý¼ºµÈ µ¥ÀÌÅÍº£ÀÌ½º¸¦ »èÁ¦ÇÒ°ÍÀÎ°¡? Y ¿£ÅÍ)

 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y (ÇöÀç ¼³Á¤ÇÑ °ªÀ» Àû¿ëÇÒ°ÍÀÎÁö? ´ç¿¬È÷ Y ¿£ÅÍ)

 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB! (³¡)

-----------------------------------------------------------
¡à Maria DB ÃÖÁ¾ Á¢¼Ó È®ÀÎ
-----------------------------------------------------------
[root@localhost ~]# mysql -u root -p
Enter password: ÆÐ½º¿öµå ÀÔ·Â  

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.1.21-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

[Âü°í]
Maria(Mysql) È¯°æ¼³Á¤À» °ü¸®ÇÏ´Â ÆÄÀÏÀº ¾Æ·¡ÀÇ °æ·ÎÀÔ´Ï´Ù.
[root@localhost ~]# vi /etc/my.cnf

my.cnf ÆÄÀÏ¼³Á¤Àº »ç¿ëÇÒ·Á´Â DBÈ¯°æ¿¡ ¸Â°Ô Æ©´×À» ÇØ¾ßÇÏÁö¸¸ ÇöÀç´Â ±âº»¼ÂÆÃÀ¸·Î °©´Ï´Ù. 
³ªÁß¿¡ µû·Î ¼³¸íÇÏµµ·Ï ÇÏ°Ú½À´Ï´Ù.

-----------------------------------------------------------
 root ÆÐ½º¿öµå º¯°æ
-----------------------------------------------------------
1. Äõ¸®¸¦ »ç¿ëÇÑ ¹æ¹ý

update mysql.user set password = password('ÆÐ½º¿öµå') where user ='¾ÆÀÌµð' and host = '%'; 
flush privileges;
 
update mysql.user set password = password('root') where user = 'root' and host='%';
flush privileges;
 
set password for '¾ÆÀÌµð'@'%' = password('ÆÐ½º¿öµå');
 
set password for 'root'@'%' = password('root');

grant usage on *.* to '¾ÆÀÌµð'@'%' identified by 'ÆÐ½º¿öµå';
grant usage on *.* to 'root'@'%' identified by 'root';

2. Ä¿¸Çµå¸¦ »ç¿ëÇÑ ¹æ¹ý

mysqladmin -uroot -p password ekdnjs@ekdnjs
