Jan
20
2010
So you install mySql on your mac, and it’s working great, but then you go into terminal to run a mysqldump or something, and it doesn’t work!
you get a message something like:
-bash: mysqldump: command not found
so how do you fix this? well, copy and paste the following into your terminal window and press enter:
echo export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" >> ~/.profile
source ~/.profile
whoa, whoa, you say. what is this doing? It makes it so that when you type any command into the terminal, it does a check of these folders before giving you the “command not found” error.
If you want to undo it, you can always edit your .profile, or just delete it.
5 comments | tags: database, internet, mac, mySql, problems, server | posted in OS X, Web Development, Web Hosting, database
Jan
12
2010
If an “unable to connect to database” comes up while installing WordPress on a Snow Leopard machine, try adding :3306 to the end of the DB_HOST in wp-config.php
Assuming everything else works, this should solve your problem!
1 comment | tags: php, server, useful, Wordpress, work | posted in OS X, Web Development, Web Hosting, Wordpress
Jan
11
2010
//tell javascript to run a function in 1 second
setTimeout ("myFunction()", 1000 );
function myFunction(){
//do stuff
//once the function is finished, queue this function up to run again in 1 second
setTimeout ( "myFunction()", 1000 );
}
1 comment | tags: HTML, internet, Javascript, useful | posted in Javascript, Tips, Web Development, usability