daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Jan 20th, 2017 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import psycopg2    
  2. try:
  3.     conn = psycopg2.connect("dbname='mb_sed_class' user='postgres' host='localhost' password='Daniel'")
  4. except:
  5.     print "I am unable to connect to the database"
  6.  
  7. print ("I connected to the database")
  8. cur = conn.cursor()
  9. cur.execute("select relname from pg_class where relkind='r' and relname !~ '^(pg_|sql_)';")
  10. print cur.fetchall()
  11.    
  12. psql -d mb_sed_clsss -U postgres
  13.    
  14. FATAL: pssword Authentication failed for user "postgres"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top