Tech Tidbits - Ruby, Ruby On Rails, Merb, .Net, Javascript, jQuery, Ajax, CSS...and other random bits and pieces.

Saturday, July 14, 2007

PHP PEAR: MDB2 Error: connect failed (localhost MySQL)

I ran into a persistent connect error when trying to connect to localhost MySQL database with MDB2.

Instead of:

dsn: mysql://my_username:my_password@localhost/my_db

use:

dsn: mysql://my_username:my_password@127.0.0.1/my_db

No comments:

About Me

My photo
Developer (Ruby on Rails, iOS), musician/composer, Buddhist, HSP, Vegan, Aspie.

Labels