Tagged: database

Configure Your wp-config.php for Database Access on Mac OSX 10.6

I ran into another problem trying to get my database to work on 10.6. The trick is to properly set DB_HOST:

 /* MySQL hostname / define('DB_HOST', ''); 

For a complete tutorial on how to setup Wordpress on Mac OSX 10.6 see http://wordpress.org/support/topic/306878?replies=6.

Continue Reading →

Dump an Existing Database Schema Into a Ruby On Rails Migration Ready Format

I have been looking around for a plugin or bit of code that can dump the schema from an existing database into the Ruby on Rails database migration format. The solution is a 'duh' moment, and probably obvious to most Rails programmers. All you have to do is change your database.yml file so that it points to the existing database you want to dump. Next run rake db:schema:dump. The schema.rb file in your db directory will now contain a dump of all the tables and indexes in your old database. Rename the schema.rb file to something else so that it doesn't get over written. Don't forget to change your database.yml file to back and now you only need to copy and paste what you need from the schema file into your migrations. This one should have been obvious, and it can save you an insane amount of time.

Continue Reading →

SQL Server 2005 Express error: 40

I ran into this error while trying to run some scripts on my SQL Server 2005 Express Database:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Had to bang my head a bit on this one, but I finally figured out that all the scripts I was running referred to 'localhost'. By default Sql Server 2005 Express installs a named instance. I was too stupid/lazy to figure out how to rename it to default so I did a quick reinstall, chose the advanced setup options and set the database as default. Works great. Now if I could just get my stupid Dell 2850 server to stop locking up. In the future I will be buying Sun Servers.

Continue Reading →