database.sarang.net
UserID
Passwd
Database
DBMS
ㆍMySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
MySQL Q&A 1810 게시물 읽기
No. 1810
shell script로 DB connect 하려는데 안돼네여..
작성자
서현수
작성일
2000-05-25 13:03
조회수
4,584

[root@stockchat bin]# pwd

/usr/local/mysql/bin

 

[root@stockchat bin]# ./mysql -u root -p password db; <--이렇게 하면

아래와 같이 에러가 떨어지네요.

 

./mysql Ver 9.36 Distrib 3.22.27, for pc-linux-gnu (i686)

By TCX Datakonsult AB, by Monty

This software comes with ABSOLUTELY NO WARRANTY.

 

Usage: ./mysql [OPTIONS] [database]

 

-A, --no-auto-rehash No automatic rehashing. One has to use 'rehash' to

get table and field completion. This gives a quicker

start of mysql.

-B, --batch Print results with a tab as separator, each row on

a new line. Doesn't use history file

-C, --compress Use compression in server/client protocol

-T, --debug-info Print some debug info at exit

-e, --execute=... Execute command and quit.(Output like with --batch)

-f, --force Continue even if we get an sql error.

-i, --ignore-space Ignore space after function names

-?, --help Display this help and exit

-h, --host=... Connect to host

-H, --html Produce HTML output

-n, --unbuffered Flush buffer after each query

-O, --set-variable var=option

Give a variable an value. --help lists variables

-o, --one-database Only update the default database. This is useful

for skipping updates to other database in the update

log.

-p[password], --password[=...]

Password to use when connecting to server

If password is not given it's asked from the tty.

 

-P --port=... Port number to use for connection

-q, --quick Don't cache result, print it row by row. This may

slow down the server if the output is suspended.

Doesn't use history file

-r, --raw Write fields without conversion. Used with --batch

-s, --silent Be more silent.

-L, --skip-line-numbers Don't write line number for errors

-N, --skip-column-names Don't write column names in results

-S --socket=... Socket file to use for connection

-t --table Output in table format

-u, --user=# User for login if not current user

-v, --verbose Write more (-v -v -v gives the table output format)

-V, --version Output version information and exit

-E, --vertical Print the output of a query (rows) vertically

-w, --wait Wait and retry if connection is down

 

Possible variables for option --set-variable (-O) are:

max_allowed_packet current value: 25165824

net_buffer_length current value: 16384

 

어떻게 해야 하는 것인지?

 

shell script로 db접근해서...내용을 파일에다가 쓸려구 하거든요..(주기적으로)

 

/usr/local/mysql/bin/mysql -u root -p password db -e 'select count(*) into outfile "asdf.txt" from member;';

 

근데..접근이 안되니까...

 

아시는 분 계시면...답변좀...

[Top]
No.
제목
작성자
작성일
조회
1818[질문]입니다.. C++Builder와 mySQL을 바로 연결하는 방법..
임승택
2000-05-25
4584
1815윈도우에서 작업한 DB를 리눅스로...
허상철
2000-05-25
4293
1817┕>Re: 윈도우에서 작업한 DB를 리눅스로...
정재익
2000-05-25 15:06:46
5167
1812초보입니다. 갈쳐 주세요
갈매기
2000-05-25
4424
1813┕>Re: 초보입니다. 갈쳐 주세요
정재익
2000-05-25 14:22:05
4363
1810shell script로 DB connect 하려는데 안돼네여..
서현수
2000-05-25
4584
1811┕>Re: shell script로 DB connect 하려는데 안돼네여..
정재익
2000-05-25 13:54:24
4276
1816 ┕>Re: Re: shell script로 DB connect 하려는데 안돼네여..
서현수
2000-05-25 15:05:42
4466
1821  ┕>Re: Re: Re: shell script로 DB connect 하려는데 안돼네여..
정재익
2000-05-25 16:53:40
4540
1826┕>Re: shell script로 DB connect 하려는데 안돼네여..
김순석
2000-05-26 02:29:03
4733
1807# 왜 이런 에러가?(ERROR 1045: Access denied for user...)
오원근
2000-05-25
4685
1809┕>Re: # 왜 이런 에러가?(ERROR 1045: Access denied for user...)
정재익
2000-05-25 10:59:46
5020
1803# 체크박스의 DB구성
김현석
2000-05-25
3962
1804┕>Re: # 체크박스의 DB구성
정재익
2000-05-25 03:56:32
4600
1802# [급질문]ASP 연결 할때?
송현정
2000-05-24
4265
1814┕>Re: # [급질문]ASP 연결 할때?
정재익
2000-05-25 14:35:53
4793
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.019초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다