REFRESH删除POSTGRESQL
sudo apt-get install python-psycopg2
sudo apt-get install postgresql
sudo su - postgres
createuser --superuser examdatabaseuser
psql
\password examdatabaseuser
createdb examdatabase
\connect examdatabase
初始化阿里云数据盘
fdisk -l
fdisk -S 56 /dev/xvdb
mkfs.ext4 /dev/xvdb1
echo '/dev/xvdb1 /mnt ext4 defaults 0 0' >> /etc/fstab
cat /etc/fstab
mount -a
df -h
psql
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO public;
COMMENT ON SCHEMA public IS 'standard public schema';
# 大换血
postgres@iZ94x23urx9Z:~$ dropdb examdatabase;
postgres@iZ94x23urx9Z:~$ createdb examdatabase;
postgres@iZ94x23urx9Z:~$ psql
psql (9.3.6)
Type "help" for help.
postgres=# \connect examdatabase
You are now connected to database "examdatabase" as user "postgres".
examdatabase=# \d
No relations found.
ALTER TABLE table_name ALTER COLUMN seq TYPE integer USING(seq::integer);
REFRESH删除POSTGRESQL的更多相关文章
- debian命令行删除postgresql数据库
创建数据库 $ createdb odoo-test 删除数据库 $ dropdb odoo-test
- 完全删除Postgresql
First: If your install isn't already damaged, you can drop unwanted PostgreSQL servers ("cluste ...
- win7 注册删除postgresql服务
注册服务 删除服务 备注:都以管理员身份运行dos
- PostgreSQL 删除数据库
PostgreSQL 删除数据库可以用以下三种方式: 1.使用 DROP DATABASE SQL 语句来删除. 2.使用 dropdb 命令来删除. 3.使用 pgAdmin 工具. 注意:删除数据 ...
- ubuntu下postgreSQL安装配置
一.安装并配置,并设置远程登陆的用户名和密码 1.安装postgreSQL sudo apt-get update sudo apt-get install postgresql-9.4 在Ubunt ...
- Ubuntu下postgresql安装
第一步:在Ubuntu下安装Postgresql 1.使用 apt-get install 安装 zhang@ubuntu:~/protgresql#sudo apt ...
- CentOS安装postgresql 9.4
第一步:在CentOS6.5下安装Postgresql 1. 安装PostgreSQL源 # yum install http://yum.postgresql.org/9.4/redhat/rhel ...
- Ubuntu 16.04 卸载Postgresql
首先确保postgresql是否在运行,在命令窗口输入 netstat -nlt han@han-OptiPlex-:~/project/0_ng_practice/ng-test$ netstat ...
- 卸载postgresql数据库
卸载postgresql数据库有两种方法,第一种一个个包卸载,第二种全部卸载.做这些之前请先做好备份,以防意外! 1.1.查询出postgres数据库,用命令rpm -qa |grep postgre ...
随机推荐
- C#之Excel操作
下面的这几个方法是我在项目中经常用到的,欢迎大家批评指正 读取Excel表中的数据 第一种:功能丰富,速度慢 /// <summary> /// 从Excel读取数据 /// </s ...
- Java并发编程之Lock
重入锁ReentrantLock 可以代替synchronized, 但synchronized更灵活. 但是, 必须必须必须要手动释放锁. try { lock.lock(); } finally ...
- [LeetCode] Merge Two Binary Trees 合并二叉树
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of t ...
- [ Java学习基础 ] String字符串的基本操作
字符串的拼接 String字符串虽然是不可变的字符串,但也同样可以进行拼接,只是会产生一个新的对象.String字符串拼接的时候可以使用"+"运算符或String的concat(S ...
- HDU 3094 A tree game
Problem Description Alice and Bob want to play an interesting game on a tree.Given is a tree on N ve ...
- Codeforces Round #452 E. New Year and Old Subsequence
Description A string t is called nice if a string "2017" occurs in t as a subsequence but ...
- [HOJ2634] How to earn more 最大权闭合子图
Xiao Ming is an expert in computer science and technology, so he can get a lot of projects every mon ...
- hdu 5475(线段树)
题意: 两个操作:① 当为1时 ,乘上后面的数 ② 当为2时,除以第x次乘的数 还说了2操作后面的n不会重复(就这明显看出线段树- -,然而并没有看出来,还是靠的队友) 1则对每个节点赋值,2则将相应 ...
- 【NOIP2017 OFO(下)】
·我不知道对不对,只是不想让大米兔就这样离开. by tkys_Austin; [另一只情绪化的兔子] 今年的11月12日NOIP提高组, ...
- [bzoj4850][Jsoi2016]灯塔
来自FallDream的博客,未经允许,请勿转载,谢谢. JSOI的国境线上有N一座连续的山峰,其中第ii座的高度是hi??.为了简单起见,我们认为这N座山峰排成了连续一条 直线.如果在第ii座山峰上 ...