docker 마리아db 실행 

docker exec -it mariadb bash 


**
docker exec -it [docker name] [실행시킬 툴]
**

 

참조 : happygrammer.github.io/docker/mariadb/

 

도커에 Mariadb 설치

 

happygrammer.github.io

 

반응형

깃허브에 저장소를 생성 후 로컬 프로젝트를 푸시하는 방법입니다.

  1. 깃허브에 레포지토리를 생성한다.

  2. git bash / terminal 등을 연다.

  3. 푸시할 프로젝트 디렉토리로 이동

  4. 디렉토리에서 깃 init실행

    git init 
  5. 첫 커밋을 위해서 git add .

    git add .
  6. 첫 커밋 실행

    git commit -m "initial commit"
  7. 생성된 깃 레포지토리의 url 복사

  8. 커맨드창에서 리모트 레포지터리 url추가
    In the Command prompt, add the URL for the remote repository where your local repository will be pushed.

    git remote add origin [remote repository URL]  
    
    git remote -v
  9. 푸시

    git push -f origin master
반응형

'프로그래밍 > git' 카테고리의 다른 글

[git] git 공식 튜토리얼 문서. 깃튜토리얼  (0) 2015.03.21

스프링부트를 코틀린 + 마리아디비 조합으로 사용하려고하는데 Mysql에 비해 MariaDB는 자료가 없어서 고생을했다. 
특히 gradle보다는 maven자료가 훨씬 많아서 찾기가 어려웠다. 
나는 아마도 다음에 이런 삽질을 또 할가능성이 크기때문에 여기에 남겨놓는다.

스프링 이니셜라이저에서 코틀린 / 웹 / JPA조합으로 생성했다. 

실행해보니  오류가 발생해서 구글링 후 실행에 성공시켰다. 
변경한 파일은 2개이다. 

application.properties /  build.gradle 두 파일이다. 

먼저 build.gradle이다. 

dependencies {
	implementation("org.springframework.boot:spring-boot-starter-data-jpa")
	implementation("org.springframework.boot:spring-boot-starter-web")
	implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
	implementation("org.jetbrains.kotlin:kotlin-reflect")
	implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
	testImplementation("org.springframework.boot:spring-boot-starter-test") {
		exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
	}

//이부분을 추가 {
	implementation("org.mariadb.jdbc:mariadb-java-client:2.1.2")
// }
}

 

build.gradle 파일에 mariadb 클라이언트 추가 후 그래이들을 새로고침 해주고 application.properties 파일을 수정해주면된다.

spring.datasource.driverClassName=org.mariadb.jdbc.Driver
spring.datasource.url=jdbc:mariadb://localhost:3306/[DB명]?useUnicode=true&characterEncoding=utf-8
spring.datasource.username=[DB유저]
spring.datasource.password=[비밀번호]

spring.jpa.show-sql=true

 

반응형

+ Recent posts