'client'에 해당되는 글 3건

  1. 2013.11.12 OSSEC Server, Client, Web UI and Analogi Dashboard Installation tutorial
  2. 2009.06.15 Oracle Database Client 통한 접속
  3. 2009.02.11 MySQL 4.1 이후 사용자 패스워드 저장 방식 변경
2013. 11. 12. 19:50

OSSEC Server, Client, Web UI and Analogi Dashboard Installation tutorial

728x90

OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response. It runs on most operating systems, including Linux, MacOS, Solaris, HP-UX, AIX and Windows. It also includes agentless monitoring for use with for example Cisco, HP or Juniper hardware.

This tutorial covers the installation of the OSSEC server, the standard OSSEC Web UI and the Analogi dashboard on Ubuntu 12.04. It also covers OSSEC setup with MySQL support, including a Makefile bugfix. Last but not least it shows you how to install the OSSEC agent on a *NIX system.

There is a new version of OSSEC, 2.8. There is also a new version of this tutorial, for the new OSSEC and for Ubuntu 14.04. Click here to read it.

This tutorial is written for an ubuntu 12.04 OSSEC server, but can be easily adapted to other *NIX operating systems. It only covers basic OSSEC client/server configuration, not automatic blocking or comprehensive configuration settings. It gets you started, the rest is available in the documentation: http://www.ossec.net/doc/

Steps

  • Installing development packages
  • Installing Apache, PHP and MySQL
  • Configuring MySQL
  • Compiling the OSSEC server
    • Makefile fix for Ubuntu
  • Basic OSSEC setup with MySQL
  • Installing OSSEC Web UI
  • Installing Analogi Web Dashboard

  • Installing and configuring a client

Requirements

  • An Ubuntu 12.04 server
  • Apache2, PHP, MySQL and development packages
  • OSSEC clients to monitor (*NIX or Windows machines, Cisco switches etc).

Installing development packages

OSSEC is installed from source, therefore you need development packages. This is both for the OSSEC clients as for the OSSEC server:

apt-get install build-essential make libssl-dev

Installing Apache, MySQL and PHP

This is fairly simple on Ubuntu. It is all covered with apt:

apt-get install mysql-server libmysqlclient-dev mysql-client apache2 php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl

Remember to give a strong root password for MySQL. Next finish MySQL with a secure installation:

mysql_secure_installation

Accept all the suggested options. Now restart all requires services:

/etc/init.d/apache2 restart
/etc/init.d/mysqld restart

Compiling the OSSEC server

Download and verify OSSEC, either via wget or from the website: http://www.ossec.net/?page_id=19

wget http://www.ossec.net/files/ossec-hids-2.7.tar.gz

md5sum ossec-hids-2.7.tar.gz
ossec-hids-2.7.tar.gz: 71cd21a20f22b8eafffa3b57250f0a70

From the OSSEC website:

MD5(ossec-hids-2.7.tar.gz)= 71cd21a20f22b8eafffa3b57250f0a70
SHA1(ossec-hids-2.7.tar.gz)= 721aa7649d5c1e37007b95a89e685af41a39da43

If it is correct, then extract it:

tar -xf ossec-hids-2.7.tar.gz
cd ossec-hids-2.7

We first need to fix MySQL support in the installation. Read on:

Makefile fix for Ubuntu

Because of some Ubuntu specific errors in compiling with MySQL support we need to edit the MySQL Makefile:

cd src
vim os_dbd/Makefile

Change this line:

${CC} ${CFLAGS} ${OS_LINK} ${DBFLAGS} ${CDB} ${LOCAL} ${OBJS} -o ${NAME}

To this:

 ${CC} ${CFLAGS} ${OS_LINK} ${DBFLAGS} ${LOCAL} ${OBJS} -o ${NAME} ${CDB}

This is only needed in Ubuntu, Debian works fine.

Run:

make setdb
Error: PostgreSQL client libraries not installed.
Info: Compiled with MySQL support.

Continue with the compilation/installation:

cd ../
./install.sh

  ** For installation in English, choose [en].
 OSSEC HIDS v2.7 Installation Script - http://www.ossec.net

 You are about to start the installation process of the OSSEC HIDS.
 You must have a C compiler pre-installed in your system.
 If you have any questions or comments, please send an e-mail
 to dcid@ossec.net (or daniel.cid@gmail.com).

  - System: Linux vps1.sparklingclouds.nl 3.2.0-042stab076.8
  - User: root
  - Host: vps1.sparklingclouds.nl
  -- Press ENTER to continue or Ctrl-C to abort. --
1- What kind of installation do you want (server, agent, local, hybrid or help)? server
  - Server installation chosen.

2- Setting up the installation environment.
 - Choose where to install the OSSEC HIDS [/var/ossec]:
    - Installation will be made at  /var/ossec .

3- Configuring the OSSEC HIDS.
  3.1- Do you want e-mail notification? (y/n) [y]:
   - What's your e-mail address? ossec@example.org
   - We found your SMTP server as: mail.raymii.org.
   - Do you want to use it? (y/n) [y]: y
   --- Using SMTP server:  mail.raymii.org.

  3.2- Do you want to run the integrity check daemon? (y/n) [y]:
   - Running syscheck (integrity check daemon).

  3.3- Do you want to run the rootkit detection engine? (y/n) [y]:
   - Running rootcheck (rootkit detection).

  3.4- Active response allows you to execute a specific
       command based on the events received. For example,
       you can block an IP address or disable access for
       a specific user.
       More information at:
       http://www.ossec.net/en/manual.html#active-response

   - Do you want to enable active response? (y/n) [y]:
     - Active response enabled.

   - By default, we can enable the host-deny and the
     firewall-drop responses. The first one will add
     a host to the /etc/hosts.deny and the second one
     will block the host on iptables (if linux) or on
     ipfilter (if Solaris, FreeBSD or NetBSD).
   - They can be used to stop SSHD brute force scans,
     portscans and some other forms of attacks. You can
     also add them to block on snort events, for example.

   - Do you want to enable the firewall-drop response? (y/n) [y]:
     - firewall-drop enabled (local) for levels >= 6

   - Default white list for the active response:
      - 205.185.112.68
      - 205.185.112.69
   - Do you want to add more IPs to the white list? (y/n)? [n]:

  3.5- Do you want to enable remote syslog (port 514 udp)? (y/n) [y]:
   - Remote syslog enabled.

  3.6- Setting the configuration to analyze the following logs:
    -- /var/log/messages
    -- /var/log/auth.log
    -- /var/log/syslog
    -- /var/log/mail.info
    -- /var/log/dpkg.log

 - If you want to monitor any other file, just change
   the ossec.conf and add a new localfile entry.
   Any questions about the configuration can be answered
   by visiting us online at http://www.ossec.net .
   --- Press ENTER to continue ---

5- Installing the system
 - Running the Makefile
INFO: Little endian set.

 *** Making zlib (by Jean-loup Gailly and Mark Adler)  ***
[...]
 *** Making os_xml ***
[...]
 *** Making os_regex ***
[...]
 *** Making os_net ***
[...]
 *** Making shared ***
[...]
 *** Making config ***
[...]
 *** Making os_maild ***
[...]
 *** Making os_dbd ***
[...]
 *** Making os_csyslogd ***
[...]
 *** Making agentlessd ***
[...]
 *** Making os_execd ***
[...]
 *** Making analysisd ***
[...]
 *** Making logcollector ***
[...]
 *** Making remoted ***
[...]
 *** Making client-agent ***
[...]
 *** Making addagent ***
[...]
 *** Making util ***
[...]
 *** Making rootcheck ***
[...]
 *** Making syscheckd ***
[...]
 *** Making monitord ***
[...]
 *** Making os_auth ***
[...]

 - System is Debian (Ubuntu or derivative).
 - Init script modified to start OSSEC HIDS during boot.
 - Configuration finished properly.
 - To start OSSEC HIDS:
                /var/ossec/bin/ossec-control start

 - To stop OSSEC HIDS:
                /var/ossec/bin/ossec-control stop

 - The configuration can be viewed or modified at /var/ossec/etc/ossec.conf
    Thanks for using the OSSEC HIDS.
    If you have any question, suggestion or if you find any bug,
    contact us at contact@ossec.net or using our public maillist at
    ossec-list@ossec.net
    ( http://www.ossec.net/main/support/ ).
    More information can be found at http://www.ossec.net
    ---  Press ENTER to finish (maybe more information below). ---

 - In order to connect agent and server, you need to add each agent to the server.
   Run the 'manage_agents' to add or remove them:

   /var/ossec/bin/manage_agents

   More information at:
   http://www.ossec.net/en/manual.html#ma

OSSEC is now installed. Restart it:

/var/ossec/bin/ossec-control restart

Continue to the next step for MySQL setup.

Configuring MySQL

We need to create a user and database for OSSEC. Go to a MySQL shell:

mysql -u root -p
Enter password:
[...]

mysql> create database ossec;
Query OK, 1 row affected (0.02 sec)

grant INSERT,SELECT,UPDATE,CREATE,DELETE,EXECUTE on ossec.* to ossec_u;
Query OK, 0 rows affected (0.00 sec)

set password for ossec_u = PASSWORD('Passw0rd');
Query OK, 1 row affected (0.01 sec)

flush privileges;
Query OK, 0 rows affected (0.00 sec)

quit;

The database also needs a schema. OSSEC provides a schema, it is located in the extracted OSSEC folder, src/os_dbd. Import it into MySQL:

mysql -u root -p ossec < src/os_dbd/mysql.schema

That's it for the database setup. Continue to see the OSSEC configuration.

OSSEC MySQL configuration

We have to add the database config to /var/ossec/etc/ossec.conf:

<ossec_config>
    <database_output>
        <hostname>127.0.0.1</hostname>
        <username>ossec_u</username>
        <password>Passw0rd</password>
        <database>ossec</database>
        <type>mysql</type>
    </database_output>
</ossec_config>

Save it, then enable the database in OSSEC:

/var/ossec/bin/ossec-control enable database
/var/ossec/bin/ossec-control restart 

Installing OSSEC Web UI

This is also quite simple. Because we've already set up Apache and PHP, we can just download the web UI and extract to /var/www/:

wget http://www.ossec.net/files/ossec-wui-0.8-beta-1.tar.gz
tar -xf ossec-wui-0.8-beta-1.tar.gz
mkdir /var/www/ossec/
mv ossec-wui-0.8-beta-1/* /var/www/ossec/
chown www-data:www-data /var/www/ossec/tmp/
chmod 666 /var/www/ossec/tmp

We use the web UI Beta because there are a lot of errors (like broken search) in the stable 0.3 version. We also set the correct permissions on the tmp/ folder. Afterwards the web ui is visible at http://hostname/ossec/.

Installing Analogi Web Dashboard

The Analogi dashboard is a nice and informative dashboard around OSSEC, which provides more visual information then the standard Web UI. The standard Web UI has better search functions, the Dashboard can be used for example on a Wall Mounted monitor and such.

Installation consists out of cloning the git repo and entering the settings file:

cd /var/www
git clone https://github.com/ECSC/analogi.git
cp analogi/db_ossec.php.new analogi/db_ossec.php
vim analogi/db_ossec.php        

Edit the relevant settings for the MySQL database configuration. When correctly configured the Analogi webinterface can be found at http://hostname/analogi/.

The OSSEC server is now correctly set up.

Client installation

Download and verify the OSSEC stable .tar.gz file as described above. This time, do an agent installation. See the output below:

root@testclient:~/ossec-hids-2.7# ./install.sh

  ** Para instalao em portugus, escolha [br].
  ** ,  [cn].
  ** Fur eine deutsche Installation wohlen Sie [de].
  **    ,  [el].
  ** For installation in English, choose [en].
  ** Para instalar en Espaol , eliga [es].
  ** Pour une installation en franais, choisissez [fr]
  ** A Magyar nyelv teleptshez vlassza [hu].
  ** Per l'installazione in Italiano, scegli [it].
  ** [jp].
  ** Voor installatie in het Nederlands, kies [nl].
  ** Aby instalowa w jzyku Polskim, wybierz [pl].
  **       , [ru].
  ** Za instalaciju na srpskom, izaberi [sr].
  ** Trke kurulum iin sein [tr].
  (en/br/cn/de/el/es/fr/hu/it/jp/nl/pl/ru/sr/tr) [en]:
 OSSEC HIDS v2.7 Installation Script - http://www.ossec.net

 You are about to start the installation process of the OSSEC HIDS.
 You must have a C compiler pre-installed in your system.
 If you have any questions or comments, please send an e-mail
 to dcid@ossec.net (or daniel.cid@gmail.com).

  - System: Linux testclient.raymii.nl 3.8.0-21-generic-pae
  - User: root
  - Host: testclient.raymii.nl

  -- Press ENTER to continue or Ctrl-C to abort. --

1- What kind of installation do you want (server, agent, local, hybrid or help)? agent
  - Agent(client) installation chosen.

2- Setting up the installation environment.
 - Choose where to install the OSSEC HIDS [/var/ossec]:
    - Installation will be made at  /var/ossec .

3- Configuring the OSSEC HIDS.
./install.sh: 372: ./install.sh: [[: not found

  3.2- Do you want to run the integrity check daemon? (y/n) [y]: y
   - Running syscheck (integrity check daemon).

  3.3- Do you want to run the rootkit detection engine? (y/n) [y]:
   - Running rootcheck (rootkit detection).

  3.4 - Do you want to enable active response? (y/n) [y]:

  3.5- Setting the configuration to analyze the following logs:
    -- /var/log/auth.log
    -- /var/log/syslog
    -- /var/log/dpkg.log

 - If you want to monitor any other file, just change
   the ossec.conf and add a new localfile entry.
   Any questions about the configuration can be answered
   by visiting us online at http://www.ossec.net .

   --- Press ENTER to continue ---

5- Installing the system
 - Running the Makefile
INFO: Little endian set.

Client OSSEC config

Adding a client to OSSEC is quite simple. First you add the client to the server, which gives you a key. Then you add this key to the client, edit the config file on the client and that's it.

First we need to generate a key on the OSSEC server for this client. We do this by running/var/ossec/bin/manage_agents, option A, then entering the hostname, IP and ID for the client we want to add. Do these steps on the OSSEC server!:

root@ossec:~# /var/ossec/bin/manage_agents

****************************************
* OSSEC HIDS v2.7 Agent manager.     *
* The following options are available: *
****************************************
   (A)dd an agent (A).
   (E)xtract key for an agent (E).
   (L)ist already added agents (L).
   (R)emove an agent (R).
   (Q)uit.
Choose your action: A,E,L,R or Q: a

- Adding a new agent (use '\q' to return to the main menu).
  Please provide the following:
   * A name for the new agent: testclient
   * The IP Address of the new agent: 10.0.51.32
   * An ID for the new agent[001]:
Agent information:
   ID:001
   Name:testclient
   IP Address:10.0.51.32

Confirm adding it?(y/n): y
Agent added.

Now we find out the key for the OSSEC client:

root@ossec:~# /var/ossec/bin/manage_agents

****************************************
* OSSEC HIDS v2.7 Agent manager.     *
* The following options are available: *
****************************************
   (A)dd an agent (A).
   (E)xtract key for an agent (E).
   (L)ist already added agents (L).
   (R)emove an agent (R).
   (Q)uit.
Choose your action: A,E,L,R or Q: e

Available agents:
   ID: 001, Name: testclient, IP: 10.0.51.32
Provide the ID of the agent to extract the key (or '\q' to quit): 001

Agent key information for '001' is:
SD[...]AAUjd=

** Press ENTER to return to the main menu.

Then switch to the OSSEC client and execute the manage_agents:

root@ossec:~# /var/ossec/bin/manage_agents

****************************************
* OSSEC HIDS v2.7 Agent manager.     *
* The following options are available: *
****************************************
   (I)mport key from the server (I).
   (Q)uit.
Choose your action: I or Q: i

* Provide the Key generated by the server.
* The best approach is to cut and paste it.
*** OBS: Do not include spaces or new lines.

Paste it here (or '\q' to quit): SD[...]AAUjd=

Agent information:
   ID:001
   Name:testclient
   IP Address:10.0.51.32

Confirm adding it?(y/n): y
Added.
** Press ENTER to return to the main menu.

And then this needs to be in the /var/ossec/etc/ossec.conf file:

<client>
  <server-hostname>ossec.raymii.nl</server-hostname>
</client>

Where ossec.raymii.nl is your OSSEC server URL or IP.

Now restart the OSSEC agents:

/var/ossec/bin/ossec-control restart
Killing ossec-monitord ..
Killing ossec-logcollector ..
Killing ossec-remoted ..
Killing ossec-syscheckd ..
Killing ossec-analysisd ..
Killing ossec-maild ..
Killing ossec-execd ..
Killing ossec-dbd ..
ossec-agentlessd not running ..
OSSEC HIDS v2.7 Stopped
Starting OSSEC HIDS v2.7 (by Trend Micro Inc.)...
Started ossec-dbd...
Started ossec-agentlessd...
Started ossec-maild...
Started ossec-execd...
Started ossec-analysisd...
Started ossec-logcollector...
Started ossec-remoted...
Started ossec-syscheckd...
Started ossec-monitord...
Completed.

That's it. Repeat these steps for any client that needs to be added. There are both puppetfiles and chef cookbooks to manage this process.

Bonus Tips

Here are a few bonus tips/config examples for OSSEC:

Ignoring rules

To very simply ignore rules based on rule id, add them to the XML file located in/var/ossec/rules/local_rules/xml, either on the ossec client for one machine or the ossec server to ignore on all machines:

<!-- Specify here a list of rules to ignore. -->
<!-- 3334 postfix start  -->
<!-- 3333 postfix stop -->
<rule id="100030" level="0">
    <if_sid>3333, 3334</if_sid>
    <description>List of rules to be ignored.</description>
</rule>

Monitoring additional log files

The OSSEC agent by default only monitors a few log files. To add more, edit the/var/ossec/etc/ossec.conf file and add a line like this:

<localfile>
    <location>/var/log/*</location>
    <log_format>syslog</log_format>
</localfile>

This will add all files under /var/log. This might be a lot, you can also just add multiple<localfile> blocks with filenames.

Firewall

You need to allow UDP port 1514 between OSSEC server and clients. Otherwise you get errors like this:

2013/09/06 19:53:00 ossec-agentd: INFO: Using IPv4 for: 10.0.51.31 .
2013/09/06 19:53:21 ossec-agentd(4101): WARN: Waiting for server reply (not started). Tried: 'ossec.raymii.nl/10.0.51.31'.

Removing OSSEC

If you want to remove OSSEC, either the client or the server, read this tutorial. It covers all the steps required to uninstall OSSEC



출처 : raymii.org



Trackback 0 Comment 0
2009. 6. 15. 19:15

Oracle Database Client 통한 접속

728x90

1. Toad 툴을 이용한 접속

PC에 win32_11gR1_client  설치하시면 설치 디렉토리 아래 network/ADMIN이라는 폴더가 생깁니다.

그 아래 들어가면 SAMPLE 이라는 하위 폴더에 tnsnames.ora 라는 파일이 있고
해당화일을 문서편집기로 열어 해당부분을 확인 수정한 후 아래 내용을 추가합니다. 

해당이름 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 해당아이피)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = 해당sid)
    )
  )

위 내용을 저장후 내용이 추가된 tnsnames.ora 을  network/ADMIN 폴더를 이동 합니다.

그런 뒤 토드 실행하면  "해당이름"이 자동으로 잡힙니다.

이제 접속 ID,비번을 입력하면 해당 DB를 확인할 수 있습니다.


2. 오라클 Client를 설치 않고 오라클서버 접속

첫번째 방법은 Instant Client를 pc에 설치하고 명령프롬프트 창을 이용한다.

http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html

오라클 공식 홈페이지에서 다운을 받는다. 

▒ Instant Client Package - Basic
▒ Instant Client Package - JDBC
▒ Instant Client Package - SQL*Plus

1.위의 세가지 압축파일을 다운후 폴더를 하나 만들고 같은 폴더에 압축해제한 파일을 모아둔다.

2.Basic을 압축해제하면 oci.dll 이나오는대 이것을 C:\WINNT\SYSTEM32 폴더안에 복사시킨다.

3.파일을 모아둔 디렉토리를 환경변수의 PATH에 등록시킨다.

  ex)C:\Ora\instantclient_10_2 이경로를 path에 등록

4.세팅이 끝났으면 시작->실행->cmd로 들어가서 sqlplus를 타이핑해본다.

5.사용자 인증 문자열의 구성은 다음과 같다.

Dos 창에서 다음처럼 서버에 접속합니다. ip는 임의의 ip를 사용했습니다.

C:\sqlplus username/password@mymachine.mydomain:port/service_name

C:\sqlplus dj01/dj01@123.123.100.32:1521/testdb.world

SQL>conn system/manager@123.123.100.32:1521/testdb.world


리눅스에서는 먼저 SHELL 설정을 해주자.

# vi /etc/profile.d/oracle.sh

export ORACLE_HOME=/oracle
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/oracle
export TNS_ADMIN=/oracle
export PATH=$PATH:/oracle

이제 tnsnames.ora 파일을 oracle 디렉토리 안에 넣어주자.

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.2)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

그리고 나서.. sqlplus 를 실행하면.. SELINUX와 몇가지 삽질을 하고..
대부분 chcon.. 어쩌구로 해결가능.. 귀찮으면 아예 꺼버리고 작업해도 된다.

(추가 작업시에 SELINUX를 켜고 작업했을 때 sqlplus를 구동하기 위해서 했던 작업들)
[root@localhost ~]# chcon -t textrel_shlib_t '/oracle/libnnz11.so'
[root@localhost ~]# chcon -t textrel_shlib_t '/oracle/libnnz11.so'
[root@localhost ~]# chcon -t textrel_shlib_t '/oracle/libclntsh.so.11.1'
[root@localhost ~]# chcon -t textrel_shlib_t '/oracle/libsqlplus.so'
[root@localhost ~]# chcon -t textrel_shlib_t '/oracle/libsqlplusic.so'

# sqlplus scott/****@orcl


3. 웹 관리툴 이용한 접속

오라클 데이터베이스에 접속하는 방법(Oracle을 실행하는 방법)
 방법1) sqlplus     : Telnet 이용(즉, TCPIP, IPX/SPX, LU6.2, AppleTalk등)
 방법2) isqlplus    : 웹이용(즉, Internet Explorer, Netscape등)

【예제】사용자 oracle로 로그인하여 다음 명령을 실행시킨다.
            이미 auto booting script로 isqlplus가 작동중이면 이 예제는 건너 뜀
$ cd bin
$ isqlplusctl start        ☜ isqlplus를 시작할 경우
$ isqlplusctl stop         ☜ isqlplus를 종료할 경우
$
 
【예제】

1) iSQLPlus URL
  웹브라우저 위치 http://192.168.0.1:5560/isqlplus

2) iSQLPlus DBA URL
  웹브라우저 위치
        http://192.168.0.1:5560/isqlplus/dba

3) Enterprise manager 10g Database Control URL
  웹브라우저 위치
        http://192.168.0.1:5500/em
 
4) Ultra Search URL
  웹브라우저 위치
        http://192.168.0.1:5620/ultrasearch

5) Ultra Search Administration Tool URL
  웹브라우저 위치
        http://192.168.0.1:5620/ultrasearch/admin

--------------------------------------------------------------------------------
PORT 번호는 오라클을 설치할 때 결정되는데 이를 확인하려면, $HOME/install/portlist.ini에서 확인할 수 있다.


오라클 Client 설정 - 캐릭터셋 설정하기

regedit 에서...

HKEY_LOCAL_MACHINE/software/oracle/HOME0/ 의 

      NLS_LANG     AMERICAN_AMERICA.US7ASCII 

=> 이래야 한글이 안깨져보이네;;


Trackback 11 Comment 0
2009. 2. 11. 15:33

MySQL 4.1 이후 사용자 패스워드 저장 방식 변경

728x90

에러메시지 : Client does not support authentication protocol requested by server; consider upgrading MySQL client

mysql> SET PASSWORD FOR root@localhost = OLD_PASSWORD('비밀번호');
Query OK, 0 rows affected (0.02 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

==== mysql4.0 이하를 사용하는 서버에서 mysql4.1 이상을 사용하는 서버의 데이타를 가져올 경우

1. PHP 업그레이드

2. DB 업데이트
   * UPDATE mysql.user SET Password = OLD_PASSWORD('password');
   * mysql서버 구동시 --old-passwords 옵션으로 실행

   ==> 4.1이상 서버에서 업데이트 함 : 해결
   ex) UPDATE mysql.user SET Password = OLD_PASSWORD('패스워드') WHERE Host = '해당IP' AND User = '사용자';


Trackback 0 Comment 0