Hot answers tagged

31

postgres=> \l Liste der Datenbanken Name | Eigentümer | Kodierung | Sortierfolge | Zeichentyp | Zugriffsprivilegien ----------------+------------+-----------+--------------+------------+----------------------- postgres | postgres | UTF8 | de_AT.utf8 | de_AT.utf8 | template0 | ...


23

The line in your netstat report shows that the database is only listening on localhost:5432 (127.0.0.1) for incoming tcp connections. Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 3561/postgres So it can only accept local tcp connections regardless of what ...


19

perhaps you mean listing users and their privileges for a database - I can't quite tell from the question: postgres=> \du List of roles Role name | Attributes | Member of -----------------+--------------+------------------------------------------------ dba | Create role | {util_user,...


19

Ubuntu or Debian can run multiple instances of PostgreSQL and provide a specific way to autostart/stop/start each cluster. There should be a file named start.conf inside /etc/postgresql/9.2/main (or more generally /etc/postgresql/<version>/<clustername>) with these self-explanatory contents: # Automatic startup configuration # auto: automatically ...


11

Open terminal and edit /etc/mysql/my.cnf sudo nano /etc/mysql/my.cnf Underneath the [mysqld] section.add: lower_case_table_names = 1 Restart mysql sudo /etc/init.d/mysql restart Then check it here: mysqladmin -u root -p variables


10

You are on Ubuntu and obviously have Martin Pitt's pg_wrapper installed (judging from pg_ctlcluster) that is provided by the package postgresql-common and comes with the standard Debian packages. I use the same on Debian. On a Linux system, run which in the shell to see which executable is actually picked: postgres@db:~$ which pg_dump /usr/bin/pg_dump ...


8

According to the MySQL Documentation, the InnoDB Buffer Pool is set to 128MB by default in MySQL 5.5. You can show how much of the InnoDB Buffer Pool is in use and reserved as follows: SELECT BufferPoolUsed BytesUsed, (BufferPoolUsed / power(1024,1)) UsedKB, (BufferPoolUsed / power(1024,2)) UsedMB, (BufferPoolUsed / power(1024,3)) UsedGB, ...


8

Are you running from the 10gen repository or from the default Debian/Ubuntu repo? I recommend using the official 10gen repository. Check this link out - [10gen MongoDB How-To Install on Ubuntu:] http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/. It is best to uninstall the previous mongodb installation prior to this change, which will also ...


8

This part is unusual: ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe/ This needs to be char-by-char identical every time. I see it ends with a slash here, which is non-standard, and I suspect that you've added it by mistake. Adding a slash will result in "ORACLE not available" in so-called bequeath sqlplus, I've just experimented on my system. Try again ...


8

"no space left on the device" could also mean that the partition is out of inodes. Use df -i to check inode usage. Edit: Each file, directory, and symbolic link requires one inode. So the idea is to remove some files from the / partition. It doesn't matter how large the files are. You can of course just pick some files on the partition and move them to ...


7

Memory usage in linux in general and for Postgres in particular is a pretty complex subject, a good starting point is Bruce Momjians blog covering the subject and the usage of smem. It is well worth following the links in Chris Seibenmanns blog on the subject.


7

When reading the configuration file, the mysql command line client only reads configuration directives found in the [client] and [mysql] sections, while mysqldump only uses configuration directives found in the [client] and [mysqldump] sections. If your socket directive in the config file is in the [mysql] section but not the [mysqldump] section then you ...


6

Type: lsnrctl start On your Unix box. That starts the listener. If you still can't connect after that it's either a firewall issue or the listener isn't configured.


6

All you should need is: listen_addresses = '*' and then to modify pg_hba.conf to permit connections from the desired source. This is stated in the comments on the (very old) article you were reading. Try using the main PostgreSQL documentation, or up to date tutorials, in future. See: Connection and authentication settings Client authentication


6

14.04 shipped with PostgreSQL 9.3, so that's what you're going to get if you use Ubuntu's repositories. If you want PostgreSQL 9.4 or newer releases you need to add a 3rd party package repository, like the official PostgreSQL repositories from http://apt.postgresql.org/ . See the instructions there for details. (You should also probably read https://help....


5

I don't know about good.. but sqlplus run in rlwrap which makes it use readline is somewhat decent for a commandline app.


5

You can use the environment variable PGOPTIONS. Either set it permanently or just when you call psql, e.g., PGOPTIONS='--statement-timeout=1min' psql ... This works for any libpq client, including psycopg. Of course you could also just put the SET statement in the psqlscript.


5

You would have play games with symlinks. WARNING : The following only works with innodb_file_per_table enabled For example, suppose your datadir was /opt/mysql/data. Each database woudl reside under that folder. If you have three databases (db1, db2, db3), then the folders are: /opt/mysql/data/db1 /opt/mysql/data/db2 /opt/mysql/data/db3 Before doing ...


5

There error is telling ... The problem is that you ran initdb as your local login, but I'm pretty that your login (username) doesn't have access to /var/run/postgresql. If you have a clean install, may I recommend that you remove the data directory and start all over, this time by su-ing into the postgres account: username@jupiter:~$ sudo su - postgres ...


5

You can turn off (and on) the paging in psql: \pset pager [on|off] If you don't specify on or off, the command will toggle the setting. (More on \pset in the documentation.) In the shell, you can even set the pager you want to use: PAGER=/usr/bin/less If you start psql after this, less will be your pager.


5

While I wait for your logs (see comments), there are two common causes for this: Bad permissions on the log file, or other bad permissions in the data path. Make sure you chown/chmod everything under the /media/newdrive/data folder. Something similar to this: sudo chown -R mongodb:mongodb /media/newdrive/data Then make sure your other mongod instance ...


5

OBSERVATION #1 Since your buffer pool is 6G (6144M), the innodb_log_file_size should be 1536M (25% of 6G) OBSERVATION #2 You have sync_binlog set to 1. This provides the safest ACID compliant setup. It can also slow things down dramatically. You say it seems as though its writing each row 1 at a time to disk. That's the case because each completed DML (...


5

Updated Per Feedback I never really found a good answer to this that didn't involve a lot of manual steps, so I made a solution. You can download a script from my oracle_instant_client_for_ubuntu Github repo which will convert Oracle rpms into Ubuntu compatible packages and then install them for you. It now supports multiple versions of the instant client. ...


5

See this part of the pg_dump manpage: -W, --password Force pg_dump to prompt for a password before connecting to a database. This option is never essential, since pg_dump will automatically prompt for a password if the server demands password authentication. Don't use -W at all. In your case, it's just confusing. Also, you need ...


5

Neither MyISAM nor InnoDB have multithreaded query implementation. Nor do other XtraDB, TokuDB. It is a long standing issue and limitation of MySQL. I don't know that the limitation is within the MySQL server, but rather in the storage engine implementation. No one ever did it... I'm currently evaluating the column-store InfiniDB and Infobright IEE. They ...


5

In the link that Dimitar provided, the question itself hints at a solution - if you're putting this in a script, you could add the SET PASSWORD line with an empty password. export DEBIAN_FRONTEND=noninteractive sudo debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password password PASS' sudo debconf-set-selections <<< '...


5

You have to use Service Names to connect to Pluggable Databases in 12c. It's just one of those things that can trip you up, I guess! SQL Plus connecting OK probably threw you.


4

DISCLAIMER : I am not a PostgreSQL DBA, though I dabble a lot with it. You probably need to check your timezone in the OS and in psql. In the OS run this: [postgres@radarPG-db1 ~]$ date Fri Jun 17 12:55:37 EDT 2011 In psql, run the following: postgres=# SELECT EXTRACT(timezone_hour FROM now()),EXTRACT(timezone_minute FROM now()); date_part | date_part ...


4

I find that error particularly disturbing because MySQL introduced INFORMATION_SCHEMA with the introduction of MySQL 5.0. @gbn's answer shows that this bug goes back to MySQL 5.0.16 was reported on ANY operating having this was based on the error happening in the IBM AIX 5.3 ML2 Operating System was closed 2006-01-26 MySQL's definition of a database is ...


4

If you are using InnoDB tables, the size of your ibdata files will grow over time. So, if you issue DELETE statement, your database size will reduce, but the ibdata file will remain the same (not reduce). If you are not using innodb_file_per_table option, the only way to reclaim the space is by dumping the database and restoring from the dumpfile. However, ...



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