Tag Info

Hot answers tagged

20

I found that I had an extremely similar problem, namely that postgres was opening a socket in /var/pgsql_socket_alt where none of my software expects to look, but the solution to my problem was not only a problem with my $PATH. I had to create the directory /var/pgsql_socket, chown it to myself, and set unix_socket_directory in postgresql.conf (located in ...


12

One of the silent killers of MySQL Connections is the MySQL Packet. Even the I/O Thread of MySQL Replication can be victimized by this. According to the MySQL Documentation You can also get these errors if you send a query to the server that is incorrect or too large. If mysqld receives a packet that is too large or out of order, it assumes that something ...


8

Locate the psql binary. (In a terminal, run locate psql | grep /bin, and make note of the path. (In my case, it's /opt/local/lib/postgresql90/bin/, as it was installed using MacPorts.) Then, edit the .bash_profile file in your home folder (e.g. mate -w ~/.bash_profile assuming you've textmate), and add the needed line so it's in your path, e.g.: export ...


6

A plausible and typical explanation would be that the psql that comes with homebrew is in /usr/local/bin/psql which is different from the one that would be in your $PATH, like /usr/bin/psql (bundled with OS X). You may want to try with the full path: $ /usr/local/bin/psql -U rails -d myapp_development Also, there's something rather unusual in the ps ...


6

The next thing to check is probably that you have a line in your postgresql.conf that looks like this: listen_addresses = '*' You will have to restart after changing that line. Otherwise your pg_hba.conf looks fine. Good luck! Getting started is a big hurdle, but once you get through it, you will probably find that compared to MySQL things are a lot ...


6

Create the new database, then create a tablespace on your external drive: CREATE TABLESPACE mytablespace LOCATION '/Volumes/externaldisk/pg'; Then alter the database so that the new tablespace is the default location for it: ALTER DATABASE MYDB TABLESPACE mytablespace; The other way to do this is to just move your entire Postgres data directory to the ...


5

Check the wiki page, many different tools available.


5

The reason is that it is wise to run the database processes under a separate account. At least one advantage of this is that the OS processes as safer in the case of the database server being hacked. On the other side the database related files are safer from the 'normal' user accounts too - the PostgreSQL cluster (or at least its data) is relatively easy ...


4

You many need to take a look at the comprehensive list of all Server Variables. Some of them you can change for the duration of your session, some you may change with the SET GLOBAL command, and other options may require a restart of MySQL. Here is the list of all options. This will also show which options can be used in option files.


4

Try specifying -h localhost as a psql parameter, to connect via tcp/ip rather than a unix socket. Likely, your psql and postgresql have different ideas of the correct setting for unix_socket_directory. Especially seeing as you have at least two different builds of postgresql installed! You might want to make sure you're using the psql client that ...


4

http://code-remind.blogspot.com.au/2011/12/on-macbookpro-10.html NOTE: Where the author suggests using the path '/Applications/MAMP/bin/stoptMysql.sh' at the end... there's a typo. Should be '/Applications/MAMP/bin/stopMysql.sh'


4

I very strongly recommend that you do not put a tablespace on an external removable drive. If the tablespaces disappears (ie: drive unplugged) you risk severe database corruption that will be difficult to recover from. You'll likely find permissions management a challenge, too. You should generally initdb a new database cluster on the drive, then start it ...


4

No, SQL Server will not run on Mac OS (it can run on a Mac, if you use Boot Camp and boot natively to Windows). Otherwise you will need to install virtualization software of some sort, where you install Windows in a VM, and install SQL Server there - I use Parallels Desktop, but there is also VMWare Fusion and Oracle VirtualBox (I haven't tested the latter ...


3

To make it easier for future users to find a working answer: It appears that one method to fix this problem is to create a symlink from the DB2 location to the Java Home you wish to use. Since I told DB2 to use my user when I installed it (this is for a development copy), the command I used to fix this problem was: sudo ln -s ...


3

Sounds like DB2 doesn't know where Java is installed. See the following three links for related information. Link One Link Two Link Three I realize these are for Linux and you are on Max OSX, but Mac's OS is a variant of Unix, so the solution should be similar.


3

Late, but I found this helpful: http://tammersaleh.com/posts/installing-postgresql-for-rails-3-1-on-lion That was for Lion, but I was having same issues as the one in this thread after upgrading from 10.6.8 to Mountain Lion and having installed postgresql via homebrew prior while on 10.6.8. I also had the mysterious /var/pgsql_socket_alt folder ...


3

You seem to have no fewer than four psql binaries on your system. All other things being equal when you type psql in the terminal it will use the first one it finds (probably /usr/bin/psql -- the one that came with OS X). Make sure you're using the psql command that matches the Postgres server you're running (you can modify your PATH= in the .profile file ...


3

I'm currently developing a Mac client for PostgreSQL named PG Commander. My goal is to make the best designed PostgreSQL client for the Mac -- it's not as full featured as pgAdmin, but it's a lot easier to use.


3

You should really increase max_locks_per_transaction. As specified in http://www.postgresql.org/docs/9.0/static/runtime-config-locks.html , changing this parameter may require to also change the System V shared memory. You have to increase that value also. In OS X this can be done as explained in ...


2

Those who have not had success with the other suggestions might consider taking a look at the BigDump PHP staggered MySQL dump importer script. It's a workaround for importing large database dumps into MySQL. I have used it successfully to import a large MySQL dump into my local development environment (I am using MAMP in this case).


2

It may not be the "correct" thing to do, but it might work (get 'er done, right?): Try breaking your large dump into multiple files and running them one at a time in sequence. My approach would be to break it in half and test. Then break each half in half, re-test, and so on. I'm somewhat curious if the amount of RAM you've got on your box could have ...


2

Yeah usually playing with wait_timeout and max_allowed_packets allows me to get around the error message as well.


2

According to the installation guide after the installation has finished there should be shortcuts for StackBuilder, pgAdmin3 and psql in the Application folder of Postgres: You will also find additional shortcuts to run pgAdmin, the psql command line interface and to access the PostgreSQL documentation. If there are such shortcuts check where the ...


2

How long does this run before timing out? First step would bet to check the wait_timeout and interactive_timeout settings to make sure they're large enough for your import: SHOW VARIABLES LIKE '%_timeout'; SET SESSION wait_timeout=28800; The default is 8 hours (28800), so that's potentially not the issue. Other indications of this issue can be found here. ...


2

Currently Oracle does not support MacOSX. They did for Tiger but dropped support plans for Apple when they bought SUN Microsystems. If you are willing to install an older version of MacOSX you can install Oracle 10.1.0.5 (fully featured) or 10.2.0.4 (incomplete). For now: forget it. What you can do is run 11g on vmware. I have it running on macs using ...


2

I had this exact same problem (although I'm on Mac OS X 10.5.8) with all the same error messages. It turned out the problem was that when the computer was turned on, MySQL was not started automatically. I solved it by manually starting MySQL: prompt$ sudo mysqld -u root <secure password goes here!> Note the sudo: MySQL wouldn't let me start up ...


2

A simple solution for that would be to keep the my.cnf file identical, and use symlinks on your machine sto point to whatever directory you want the data to be in. For example, assuming you my.cnf contains this: [mysqld] datadir=/mysql_data On you linux host, you would: cd / ln -s /var/lib/mysql mysql_data Add permissions to this folder for mysql user: ...


2

I've only just signed up to the dba SE, so don't seem to be able to comment on the relevant post (what a crock!). However, I was confident that I was in the same boat as @thure. I'd made sure /usr/local/bin was earlier in my PATH than /usr/bin, had checked which binaries the shell had hashed with which and type, etc. I saw the same symptoms as @thure. Then ...


2

First of all you need to edit/create the /etc/sysctl.conf and insert the following: kern.sysv.shmmax=1073741824 kern.sysv.shmmin=1 kern.sysv.shmmni=4096 kern.sysv.shmseg=32 kern.sysv.shmall=1179648 ...


2

Try: psql -U rails -d myapp_development -h localhost or psql -U rails -d myapp_development -h 127.0.0.1



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