# mysql -u root -p
Enter password :
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 71975
Server version: 5.1.41-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cacti |
| jgzero |
| mysql |
| test |
+--------------------+
5 rows in set (0.02 sec)
mysql> use mysql;
Database changed
mysql> show tables;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| servers |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
23 rows in set (0.04 sec)
mysql> select host, user from user;
+-----------+-------------+
| host | user |
+-----------+-------------+
| % | root |
| jgzero | |
| jgzero | root |
| localhost | |
| localhost | cactiuser |
| localhost | jgzero |
| localhost | root |
+-----------+-------------+
8 rows in set (0.01 sec)
: % 는, 모든 외부접속을 허용 한다는 의미
: 000.000.000.000 는, 특정 아이피만 접속 허용 가능
: 000.000.000.% 는, 특정 아이피 대역 접속 허용 가능
mysql> update user set host='원하는 설정 값' where user='root' and host='127.0.0.1';
'기술자료 > 기술운영자료' 카테고리의 다른 글
MSSQL DB 복원후 사용자 및 스키마 일괄 변경 스크립트 (0) | 2016.03.20 |
---|---|
MySQL root 패스워드 분실했을 때 (0) | 2016.03.20 |
Linux Oracle 시작 (0) | 2016.03.20 |
MySQL root 초기 암호 설정 및 유저 추가 (0) | 2016.03.20 |
MySQL Database 생성 (0) | 2016.03.20 |