Home > find > Find all postgresql and mysql databases on a system

Find all postgresql and mysql databases on a system

March 29Hits:2

Is there a way to find all postgresql and mysql databases on my system? (Perhaps using the find command).


If the database servers are running, ask them:

psql -l

mysql <<< 'show databases'

Just searching the filesystem for relational databases is not a trivial task.

On my system, the files for postgresql 8.4 are installed in:

 sudo ls -l /etc/postgresql/8.4/main/pgdata/base/
 sudo ls -l /var/lib/postgresql/8.4/main/base

where /etc contains a symbolic link to /var/lib.

You need sudo permissions to watch these directories.

Related Articles

  • Find all postgresql and mysql databases on a systemMarch 29

    Is there a way to find all postgresql and mysql databases on my system? (Perhaps using the find command). --------------Solutions------------- If the database servers are running, ask them: psql -l mysql <<< 'show databases' Just searching the fi

  • Access mysql database from another system using LAN (Wired or Wireless)June 2

    I am trying to access a MySQL database from another system using java wireless connection. While changing IP address of both system its not working and thus error occurred as shown below: "HTTP Status 500 - javax.servlet.ServletException: java.sql.SQ

  • Distributing MySQL database on n systemsAugust 29

    I have a webserver in my application which talks to a single MySQL node. Instead of having just one MySQL node, I want to have a cluster of n nodes which form my database. Is it possible to do this? Can some one point to a resource where I can read a

  • MySQL databases irrecoverable after system rebootFebruary 11

    We had a power cycle in our lab, and our mysql server restarted. It seems that the system created a tar ball of my mysql data folder, then un-tarred it. Or in some other way, tried to 'recover' and really messed things up. Now I cant access any of my

  • Migrate OTRS database from PostgreSQL to MySQLMarch 30

    OTRS supports PostgreSQL and MySQL databases. I'm using PostgreSQL 9.1 for my OTRS 3.2 but I want to migrate to MySQL 5.5. Is this possible? How? --------------Solutions------------- OK, after more research I found this question. So this is what I di

  • How should I copy the "mysql" database to my new server using PHPMyAdminApril 1

    My new webhosting company has set up a MySQL database for me and it has the tables MySQL and Information_schema already there. I want to copy my existing database from another server (a) to the new one (b). I assume I need to overwrite the 'mysql' da

  • How to restore mysql databases from file diskSeptember 3

    I used to have a few mysql databases on my system, but my operating system crashed and I cannot access the installed mysql service anymore. The only thing that I have is access to the database files in /var/lib/mysql. I searched in forums about the w

  • Which database server scales better: PostgreSQL or MySQL?May 1

    I'm working on a website that could eventually have a very large database. The website will be an art community not until deviantART. I'll be running a lot of queries for analyzing how the site is used. I expect some of the queries to kill the databa

  • How to convert Mysql database to Postgresql in Linux?January 3

    I have a large Mysql database containing tens of tables which I need to convert to Postgresql. I have tried a couple of ancient Perl scripts which I found here and there but none of them did the job correctly. So wondering if there is any free and ef

  • How to convert a MySQL database to PostgreSQL?March 29

    Is there any command line tool for converting the MySQL database to PostgreSQL? I'd also like to know if there is a way to convert the database using the normal mysqldump command. --------------Solutions------------- have you tried: mysqldump --compa

  • RSS Feed getting data from mysql database and outputting £ - How do I display £ instead of £ even though my feed is calling UTF8? November 10

    I'm setting up a new server, and want to support UTF-8 fully in my web application. I have tried in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aw

  • How do you handle the task of changing the schema of a production MySQL database?October 25

    One of the biggest complaints I have heard about MySQL is that it locks up a table if you try to change its schema like adding a column or adding an index. By "locking up the table" does it mean I can neither read nor write to the table? Sometim

  • PostgreSQL or MySQL for shared hostingSeptember 28

    I want to offer SQL shared hosting for customers. Ideally I'd like: access isolation (one user shouldn't see information about other user's databases) SQL disk space quota per SQL user ability to limit or deprioritize CPU usage of intensive queries s

  • Is it possible to query a MySQL database using the results from map.getBounds() with Google Maps API v3?March 13

    I have a MySQL database that contains a large number of polygons, one for each district on a map. They are all quite complicated and it's unrealistic to simply load them all at once. I've looked into using MarkerManager for Google Maps API v3 and thi

  • Redmine installation issues rake command issue, MySQL database issue?October 7

    I have somewhat of a complex issue involving several different programs including redmine, MySQL, Ruby, Ruby on Rails etc. This is on Windows XP. I am following the redmine instructions here: http://www.redmine.org/projects/redmine/wiki/RedmineInstal

  • From a shell script, how can I check whether a table in MySQL database exists or not?November 24

    I am trying to write a script which allows a user to select the what manipulation he needs to do on a table. I want to check if the table exists or not. If it exists I will continue the other things or else I exit saying table doesn't exist. How migh

  • How do I change the MySQL database directory?February 26

    I am using CentOS with cPanel. On my server, all MySQL databases save at /var/lib/mysql. Now /var is 100% full and MySQL has stopped working. How can I move the databases to a new directory like /home/mysql especially considering that this server is

  • How could I move a huge mysql database from one server to another mysql serverMarch 8

    I have a huge mysql database , say about 15G size . Now I want to move the database to another mysql server , the normal way to do this is to export mysql file then import this file to the target server . But I find it is so slow and error occured in

  • How to convert PostgreSQL to MySQLApril 27

    How can I convert database from PostgreSQL to MySQL? I have the postgresql dump file already and I try to use pg2mysql script, it converted but when uploading the file it produces this error: ERROR 1064 (42000) at line 4: You have an error in your SQ

  • PostgreSQL vs MySQL benchmarks when a 2nd level cache is includedMay 4

    Has anyone been able to find any benchmarks comparing PostgreSQL and MySQL performance when they are used by a system through Hibernate (or another comparable ORM) and the 2nd level cache (backed by Memcache, EhCache, etc) is enabled? I've seen a lot

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.651 s.