How to start MySQL server from command line on Mac OS Lion?

I installed mySQL on my Mac. Beside starting the SQL server with mySQL.prefPane tool installed in System Preferences, I want to know the instructions to start from command-line. I do as follows: After su root I start the mySQL server by command-line, but it produces an error as below: sh-3.2# /usr/local/mysql/bin/mysqld 111028 16:57:43 [Warning] Setting … Read more

Possible to do a MySQL foreign key to one of two possible tables?

Well here’s my problem I have three tables; regions, countries, states. Countries can be inside of regions, states can be inside of regions. Regions are the top of the food chain. Now I’m adding a popular_areas table with two columns; region_id and popular_place_id. Is it possible to make popular_place_id be a foreign key to either … Read more