• 흐림동두천 12.5℃
  • 흐림강릉 12.0℃
  • 흐림서울 12.9℃
  • 흐림대전 12.4℃
  • 대구 10.6℃
  • 흐림울산 12.2℃
  • 광주 11.4℃
  • 흐림부산 14.6℃
  • 흐림고창 10.9℃
  • 제주 15.3℃
  • 흐림강화 12.9℃
  • 흐림보은 11.6℃
  • 흐림금산 12.4℃
  • 흐림강진군 12.4℃
  • 흐림경주시 7.6℃
  • 흐림거제 13.5℃
기상청 제공

mysql설치후 root 패스워드 설정하기

// mysql root password 등록


[root@linux mysql]# mysql -u root -p mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 1 to server version: 4.0.23-Max

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.


mysql> update user set password=password('비밀번호입력') where user='root';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2  Changed: 2  Warnings: 0


mysql> flush privileges;  <==  mysql 재시동
Query OK, 0 rows affected (0.00 sec)


mysql> quit


// 접속 확인하기

[root@linux mysql]# mysql -u root -p mysql
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 4 to server version: 4.0.23-Max

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.