[MySql]is not allowed to connect to this MySQL server

Computer/ETC 2007. 8. 24. 14:07
출처: http://blog.naver.com/ddak2ya?Redirect=Log&logNo=30004371547

Trouble Shooting -
Error MSG: Host 'XXX' is not allowed to connect to this MySQL server


Host 'mcr-tf3c16x72pp' is not allowed to connect to this MySQL server
localhost로는 접속이 가능하고 IP로는 접속이 불가능한 이유는 접속가능한 IP로 등록이 되어 있지 않기 때문입니다.

select * from mysql.user

로 보시면 localhost는 보이나 IP는 보이지 않을것입니다.

mysql> grant all privileges on db명.* to 사용자계정@'IP주소'
identified by '비밀번호' with grant option;
mysql> grant reload,process on *.* to admin@localhost;
mysql> FLUSH PRIVILEGES;

위의 명령어로 접속가능한 IP로 등록해 주면됩니다.

mysql , C 연동.

Computer/ETC 2007. 7. 25. 14:12

프로젝트 하다가...찾은 내용들.

mysql 에서 유저 추가 및 테스트...

Computer/Linux Tips 2007. 7. 19. 16:14

은근.....복잡하다 -_- ....

DB명: profile
User ID: caw

-- system console --

mysql -u root

-- mysql console --

use mysql

insert into user (host,user,password) values ('localhost','caw',password('password'));

// 뒤의 y들은 다 권한들이다. schema를 잘 보고 개수를 잘 맞춰야함 ;;;
insert into db values('localhost', 'profile', 'caw', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y', 'y');

-- system console  --

mysqladmin create profile

/etc/init.d/mysqld restart  // root에서 작업

----- test -----

mysql -u caw -p password

show databases; // profile db가 생성되었는지 확인

use profile

show tables;

create table mytable(id int, name char(10));

insert into mytable values(1, 'namename');

select * from mytable;

drop table mytable;

mysql: Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock'

Computer/Linux Tips 2007. 7. 16. 19:53

Fedore에서 mysql을 설치하고 실행하려는데 다음과 같은 에러 발생.

[root@vmm geniuskch]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock' (2)

대책을 찾던 중 KLDP에 나온 내용으로 해결.

출처: http://kldp.org/node/64774

'Computer > Linux Tips' 카테고리의 다른 글

grep 사용법  (0) 2007.09.27
mysql 에서 유저 추가 및 테스트...  (0) 2007.07.19
MPlayer v1.0rc1 source compile trouble shooting  (0) 2007.07.10
"ld: cannot find -lX11" error가 날때.  (2) 2007.07.09
Linux Shell programming 관련  (0) 2007.04.17