2014년 1월 8일 수요일

[Tip] 맥에서 mysql 설치후 root 계정 패스워드 설정


Mysql 다운  : http://www.mysql.org

Mysql 설치 및 기동후에 아래의 절차에 따라 root 계정의 패스워드를 설정이 가능하다. 


da-base-069:bin myid$ cd /usr/local/mysql/bin
da-base-069:bin myid$ sudo ./mysql
Password:[엔터]
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 5.6.15-log MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use mysql
Database changed
mysql> update user set password=password('root') where user='root';
Query OK, 4 rows affected (0.00 sec)
Rows matched: 4  Changed: 4  Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
da-base-069:bin myid$ ./mysql -u root -p
Enter password: [패스워드]
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 96
Server version: 5.6.15-log MySQL Community Server (GPL)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit
Bye





댓글 없음:

댓글 쓰기