Tag Info

Hot answers tagged

12

Is this your first install? Have you tried to run initdb /usr/local/var/postgres? That just solved the same issue, which has just happened to me after clearing an old system-wide PostgreSQL install and reinstalling it using Homebrew. Running brew info postgres is always useful as a reminder of the commands available after installing a package. postgresql ...


10

Ever Forward will answer your question: This is not an Internet URL, but it functions similarly. You now need to tell LibreOffice to connect to a specific database on a specific computer: dbname=mydb host=localhost Use the name of your database in the dbname part. I used localhost for the host part, since PostgreSQL is on the same computer, ...


7

I know this Q is closed.. but here is more data information for someone who may stumble across this topic. Another form of datasource URL is in the format of: dbname=postgres hostaddr=127.0.0.1 port=5433 user=db_user password=libreoffice I needed the above, because the default port used by LibreBase is 5432, but I needed 5433. This URL format is ...


6

Since I'm answering my own question, I was just going to delete it but others may find it useful in future. The solution is to brew uninstall postgresql then install it again. The reason it wasn't working was that the Macports install messed with some of the configs.


6

Note that with PostgreSQL 9.0 (and probably newer) on Mac OS 10.6.8 (and probably older), in order to prevent the PostgreSQL server from auto-starting, you have to: Go to /Library/LaunchDaemons/ Open com.edb.launchd.postgresql-9.0.plist in an editor as root (replace 9.0 with your correct version number), e.g. sudo vim com.edb.launchd.postgresql-9.0.plist. ...


6

This article and its comments might help: “FATAL: Ident authentication failed”, or how cool ideas get bad usage schemas


6

Install PostgreSQL, restore from backup, export the schema and data then import into MySQL.


5

Consider using Homebrew brew install postgresql It'll give you the necessary headers.


5

pgAdmin -> Only for PostgreSQL SQL Workbench -> For many RDBMS


5

You could probably create a procedure to this, but out of the top of my head I'd just do a database dump (pg_dump) and search the file.


5

=> \a Output format is unaligned. => \f , Field separator is ",". => select 'John' "Name", 24 "Age"; Name,Age John,24


4

try this: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' sudo apt-get update sudo apt-get install postgresql-9.3 pgadmin3 It worked fine for me. Source: How to: Install PostgreSQL ...


4

The Linux kernel decides to put memory pages in swap when they're not used too frequently, even when it has some memory available. You can tweak this behaviour by adjusting the 'swappiness' of the memory manager by doing $ echo 50 > /proc/sys/vm/swappiness where 50 is a value between 0 (swap least possible) and 100 (swap out as much as you like). See ...


4

Once you've installed the PostgreSQL server with apt-get install postgresql-9.1, it's already set up and running so your steps #2 and #3 (run postgres and run initdb) are not necessary and in fact would conflict with what has already been set up. By running manually initdb you'll end up with two postgres clusters. The postgresql packages for Debian and ...


4

Try setting the database: psql -d postgres: echo `ALTER DATABASE x RENAME to y` | psql -d postgres "template1" or "postgres" should be available. See http://stackoverflow.com/questions/4483139/php-how-do-i-connect-to-postgresql-without-specifying-database-name


4

If machine gets turned off without going through the actual shutdown process, then PostgreSQL will refuse to start during the next boot up. This is because the PID file from before is still there and PostgreSQL thinks it is already running. That is what the error message in your edit is telling you. What you need to is remove the postmaster.pid file from ...


4

You can set PuTTY to use UTF-8 from the configuration dialog when you connect. Go to Window -> Translation, and set "Received data assumed to be in which character set" to UTF-8. Also check that your locale is something ending in UTF-8 by running locale after connecting. If it's not, run locale -a to see all the locales you have available. If there are no ...


4

http://www.postgresql.org/docs/8.1/static/tutorial-createdb.html Another response could be this: createdb: could not connect to database postgres: FATAL: user "joe" does not exist where your own login name is mentioned. This will happen if the administrator has not created a PostgreSQL user account for you. (PostgreSQL user accounts are distinct ...


3

PgAdmin is a good admin tool, and works with Mac OS X. PhpPgAdmin should also work on OS X, although you'd need to install and set up PHP, which I can offer no advice on.


3

It's obvious that you don't have permission to contact server from that IP. Complete docs on pg_hba.conf are here. You'll just need to add md5 auth for your host What you probably need is: host all all 192.168.0.100/32 md5 And yes, I basically copied the answer from above, but since the original error was a "test" user trying to access the "postgres" ...


3

Change the 'postgres' password with something like : psql --echo-all --echo-queries postgres -U postgres --command "alter role postgres encrypted password 'YOURPASSWORD'"


3

Your syntax is correct but only for PostgreSQL 9.0 and newer. In 8.3 you will have to list all tables by name: GRANT SELECT, INSERT, UPDATE, DELETE ON tab1, tab2, tab3 TO foo;


3

According to this historical Gentoo ebuild, postgresql 7.4.6 was considered stable in Gentoo on x86, sparc, alpha, hppa and amd64 architectures. (I assume you aren't talking about IA-64.) The same ebuild makes provisions for some patching for hppa architecture, and always applies this patch, which appears to remove some termcap linking problem and change ...


3

The general purpose sql-db browser from sqlmaestro is also quite good.


3

You already had PostgreSQL installed, and you deleted the data dir without stopping the running server. So you now have some orphan PostgreSQL server processes that are managing data files that've been deleted, so they're no longer accessible in the file system and will be fully deleted when the last open file handle to them is closed. You can't use pg_ctl ...


3

When you run sudo it is best to put the full path to the command you are running. In your instance: sudo /usr/lib/postgresql/9.1/bin/initdb /usr/local/var/postgres


3

Try augeas. It offers both Python bindings and a command-line interface - augtool. [dba@pgsql ~]$ augtool augtool> defvar pghba /files/var/lib/pgsql/data/pg_hba.conf augtool> #################################### augtool> ls $pghba #comment[1] = this is a comment 1/ = (none) 2/ = (none) #comment[2] = this another comment 3/ = (none) augtool> ...


3

It appears that you have a database user named kuser, but there is no system user with that name. This is why you're able to get a postgres prompt as that user, but sudo fails. That user isn't able to create a database, because that account doesn't have the necessary permission. You can either grant that permission to the user, using the postgres account ...


2

apt-get is breaking because of missing directory. You can do the following mkdir -p /var/lib/postgresql/9.1/main Then try remove again.



Only top voted, non community-wiki answers of a minimum length are eligible