MySQL
MySQL tips
Submitted by phecht on Sun, 2010-08-29 16:09Here is how to create a MySQL database with out having to remember the syntax:
#!/bin/bash
EXPECTED_ARGS=3
E_BADARGS=65
MYSQL=`which mysql`
Q1="CREATE DATABASE IF NOT EXISTS $1;"
Q2="GRANT INSERT, SELECT, UPDATE, DELETE, CREATE, DROP, ALTER ON '$1'.* TO '$2'@'localhost' IDENTIFIED BY '$3';"
Q3="FLUSH PRIVILEGES;"
SQL="${Q1}${Q2}${Q3}"
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: $0 dbname dbuser dbpass"
exit $E_BADARGS
fi
$MYSQL -uroot -p -e "$SQL"
Just put that into a file, change the permissions and you should be able to create a user and database. You might have to change the "-uroot" if you are on a shared host.
How to develop for Drupal
Submitted by luke on Sun, 2010-04-18 06:19A new developer often find setup issues starting Drupal development. I'm trying to make it easier for people.
Overview: (click read more)
- Install Mysql, Apache, PHP. Versions should be MySQL 5.x, Apache 2.x, and PHP 5.x. This is harder than it should be. One OK solution is to install XAMPP on Windows. MacPorts has a nice system to install everything one needs.
- Often, you will find issues with PHP modules not being installed. One should learn how to add PHP modules in Windows and Unix.
- MySQL connection issues through Apache will also be a configuration issue.
Nice ISP in Box page
Submitted by albert on Sat, 2008-06-14 11:43Updated! http://diymacserver.com/ is the updated site.
While we all want to have straight forward instructions on getting an Apache, MySQL and PHP set up on your mac, even a mini. It has been very valuable to me. Many recipes out there, this one hasn't left me re-configuring over and over again.
Build mod_python with MAMP 1.7.1
Submitted by albert on Mon, 2008-06-09 19:08http://forum.webedition.de/phpBB/viewtopic.php?t=1866 this site give the contents of a config_vars.mk file that you need if you are going to build mod_python.
