MySQL 사용자 추가 및 DB 권한 주기

 Mysql, 리눅스  Comments Off on MySQL 사용자 추가 및 DB 권한 주기
Sep 062010
 

ID, pass, DB 부분을 필요한 정보로 바꿔주면 됩니다.

1. root로 mysql에 로그인하여

USE mysql;

INSERT INTO user (host, user, password) VALUES (‘localhost’,’ID’,password(‘pass’));

INSERT INTO db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv) VALUES (‘%’, ‘DB’, ‘ID’, ‘Y’, ‘Y’, ‘Y’, ‘Y’,’Y’,’Y’);

GRANT ALL on DB.* TO ID;

FLUSH PRIVILEGES;

2. ID로 mysql에 로그인하여 DB를 생성
create database DB;

 Posted by at 6:59 PM

리눅스 서버의 사용자 계정에서 홈페이지 서비스 가능하도록 설정하는 방법

 리눅스  Comments Off on 리눅스 서버의 사용자 계정에서 홈페이지 서비스 가능하도록 설정하는 방법
Sep 062010
 

리눅스 서버의 사용자 계정에서 홈페이지 서비스 가능하도록 설정하는 방법.
Fedora 9 기준.

root로 로그인하여
1. httpd.conf 설정
UserDir disable 을 코멘트 처리
UserDir public_html 을 언커멘트
2. httpd 서비스 재시작
service httpd restart
3. 사용자 계정 생성
useradd id
passwd id – 초기 패스워드 설정
4. 계정 접근권한 설정
chmod a+x ~id
5. SeLinux에서 엑세스 허용
restorecon -R -v /home/id

사용자 id로 로그인하여
1. 홈디렉토리에 public_html 디렉토리 생성
2. public_html 디렉토리에 index.html 작성
3. localhost/~id 로 접속하여 서비스 동작 확인

 Posted by at 3:12 PM

Mysql Initial message

 Mysql, 리눅스  Comments Off on Mysql Initial message
Sep 062010
 

MySQL 데이타베이스를 초기화하고 있습니다: 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 crisftp.joongbu.ac.kr 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 mysql-test ; perl mysql-test-run.pl

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

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[ OK ]
MySQL (을)를 시작합니다: [ OK ]

 Posted by at 2:11 PM