Saturday, March 13, 2010

Creating spatial database in MySQL

CREATE TABLE `dev_atacan_rets`.`points` (
`name` VARCHAR(20) NOT NULL,
`location` POINT NOT NULL,
`description` VARCHAR(200),
SPATIAL INDEX(location)
)
ENGINE = MyISAM;

(Engine part is the important part)

Monday, March 8, 2010

Moving the Wordpress blog to GoDaddy from local machine:

http://www.mariasguides.com/2006/09/25/moving-a-wordpress-blog-to-godaddy-hosting-account-part-2/

Renaming MySQL database:
1. hover over hosting and servers
2. click on my hosting account
3. open the appropriate hosting account
4. click on databases
5. click on mySQL
6. click on view/edit details (the little pen icon)
7. it’s listed under host name
http://rowast.com/2008/01/14/wordpress-db_host-and-godaddy-wont-play-nice/

Or can take a backup of the MySQL and while Restoring it change the database name.

Sunday, March 7, 2010

Rename MySQL Database

1) Open command prompt and invoke Musql with this command
c:\ mysql -u root -p (After login)
mysql> create database
mysql> quite

Now on command prompt:
c:\ mysqldump old_database -u root -p | mysql -D new_database -u root -p
enter password twice and then it will copy the contents from the old database to the new one.

It'll dump out the old database to STDOUT, pipe this to a second MySQL process and insert the dumped data (and schema) to the new DB.

You'll have to manually DROP the old DB and change the permissions on the new DB, but at least you have the data and schema

courtesy: http://www.delphifaq.com/faq/databases/mysql/f574.shtml