본문 바로가기
NAS

nas4free mysql install

by 자바초보자 2016. 5. 5.
728x90

nas4free mysql install

 

Then with SSH:


# mkdir -p /mnt/data/db/mysql
# chmod -R 777 /mnt/data/db
# ln -s /mnt/data/db/mysql /var/db/mysql
# ln -s /mnt/data/db/mysql /usr/local/data



# pkg install mysql55-server
# rehash
# cd /usr/local
# mysql_install_db
# chown -R mysql:mysql /mnt/data/db/mysql/
# mysqld_safe &


And gave a passwords:


# /usr/local/bin/mysqladmin -u root -h localhost password 'new-password'
# /usr/local/bin/mysqladmin -u root -h nas4free.local password 'new-password'

nas4free web page
Then added mysql_enable="YES" to rc.conf:
select System -> Advanced -> rc.conf
name: mysql_enable
value: YES

 

=========================

mysql 접속

mysql -u root -p

 

mysql>

 

*모든 아이피 접속 허용

mysql> SELECT Host FROM mysql.user WHERE user='root';

+----------------+
| Host           |
+----------------+
| 127.0.0.1      |
| ::1            |
| localhost      |
| nas4free.local |
+----------------+
4 rows in set (0.00 sec)

mysql> INSERT INTO mysql.user (host,user,password) VALUES ('%','root',password('비밀번호입력'));
Query OK, 1 row affected, 3 warnings (0.00 sec)

 

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
Query OK, 0 rows affected (0.00 sec)

 

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

 

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

======================

 

 

 

 

 

 

 

 

728x90

'NAS' 카테고리의 다른 글

nas4free java + tomcat 설치  (0) 2016.05.06
pkg 설명  (0) 2016.05.03
nas4free svn 설치  (0) 2016.05.03
FREEBSD 비정상적으로 종료되어 싱글모드로 계속될때  (0) 2015.10.07
freebsd 부팅오류 singlemode  (0) 2015.10.07