su의 -c 옵션 사용 시 ' ' 안에서 ' (single quote) 사용

  • intersection3
    (동교동삼거리)
  • intersection3's Avatar 이 글의 작성자
  • Offline
  • ★ Tech Writer ★
  • ★ Tech Writer ★
더보기
25 Jul 2016 23:24 - 25 Jul 2016 23:24 #1080 작성자: intersection3
intersection3 님의 글: su의 -c 옵션 사용 시 ' ' 안에서 ' (single quote) 사용
su mariadb -c '/sw/mariadb/bin/mysql -uroot --password=root -e "delete from mysql.user where user = ''; drop user root@'::1'; flush privileges;"'

오류가 발생할 것이다. 다음과 같이 변경한다.

su mariadb -c '/sw/mariadb/bin/mysql -uroot --password=root -e "delete from mysql.user where user = '"'"''"'"'; drop user root@'"'"'::1'"'"'; flush privileges;"'
Time to create page: 0.080 seconds
Powered by Kunena Forum