zoukankan      html  css  js  c++  java
  • ubuntu中用命令创建数据库

    # switch to postgres account
    sudo su postgres
      
    # create a new postgres login: jetty; and set the password to jetty
    # since most of our database dump has jetty as the user
    createuser -P -d -a -e jetty
    #password jetty
     
    # create a new postgres login: logintext;
    # this is also due to database dump file; SHOULD HAVE DUMP DATABASE WITH -U option;
    createuser -P -d -a -e logintext
    # create a new empty database
    # set the password to jetty (to be consistent with application setting - only for DEV/TESTING)
    createdb test -O jetty
      
    # grant permission to jetty
    psql
    #click Enter on keyboard
    GRANT all on database test to jetty;
    #click Enter on keyboard
    q
    #click Enter on keyboard
     
    # restore database option1
    psql test </tmp/<dumpfile>
     
    # restore database option2
    psql -d test -t ~/tmp/<dumpfile>
     
    # restore database option 3
    # psql -d <database> U <username> -f <filename>
    psql -d test -U logintest -f demo.test.s83.0.sql
     
    # return to your own account
    exit
  • 相关阅读:
    面试问题总结
    2016后半年读书系统
    java基础知识
    自动化测试的误区
    软件测试的艺术
    QTP
    软件测试的艺术读书笔记
    Jquery中$(document).ready()
    Python爬取糗事百科示例代码
    【转载】气象数据相关资源
  • 原文地址:https://www.cnblogs.com/cc-java/p/6474812.html
Copyright © 2011-2022 走看看