Hello Nagananda,
Hope this answers all your queries:
1) Most Linux installations come bundled with MySQL server, you just need a few
preparatory steps to start creating and using databases.
i provide a complete guide for this (for the distribution 'Fedora 9') at the
end of this mail. The steps are similar for other distributions. Feel free to
request assistance for a specific distribution. (i shall also add this to MIFOS
documentation.)
2) A "hard file copy of the database from Windows to the linux data file
folder" is NOT advisable, especially when the database is in use, especially
since MIFOS uses the InnoDB engine for some tables
Instead, MySQL has simple-to-use export and import tools that produce
human-readable text files. Furthermore, these files are portable between MySQL
versions and MySQL installations on different platforms (unlike some other
databases, where a database dump created by export is sensitive to database
versions).
i did not quite understand why backing up and restoring an 80 GIG database
takes you so long. This is not really a "large" database by any standards.
Organizations routinely backup and restore terabyte databases in hours, if not
minutes. We can have a separate conversation on fast-and-easy backup and
restore.
3) There are many options to the backup and restore issue you mention.
4) Once you get the networking and security right, MySQL does not care about
the platform that the database instance lives on. i'd be glad to assist you
with setting this up. Contact me on kml...@yahoo.in or 09850054037
regards,krishnan
== MySQL install guide BEGINS==
Lines prefixed with ==, //, # are all comments== is a step in the process// is
an 'instruction'# describes the purpose of the commandCommands are on a line by
themselves. Most commands are run from the command line, except ones issued
from the mysql client.
==Verify or install MySQL server (and development libraries) from the
internetyum install mysql-server mysql-libs mysql-devel
==Install MySql//Verify mysql is availablecd /usr/binls -l mysql*#Lists mysql
scripts, etc.
#Shutdown mysql if already running, before running the below. pgrep
mysql #pgrep returns process ids of any mysql processes if running, else
nothing/sbin/service mysqld stop
//Startup mysql without grant tables loadedmysqld_safe --skip-grant-tables &
//Login to mysql without a password to verifymysql -u root#Quit mysql
#Shutdown mysql again
//Install mysql from the shell prompt/usr/bin/mysql_install_db
//Run mysqlmysqld_safe &pgrep mysql#If mysql is running, pgrep returns process
IDs of mysql processes, else nothing
//Secure mysql as needed (*REMEMBER* root password assigned as part of this
process)mysql_secure_installation
#Login to mysql as root with assigned password, and verifymysql -u root -p
#Creating a new database named 'test'create database test;
#Creating a user 'testusr' with password 'test', and granting all privileges on
the 'test' database to this user grant all on test.* to 'testusr'@'localhost'
identified by 'test';flush privileges;
==Change character sets and collations used by MySql (assuming that you need
UTF-8 to support multi-byte characters)//Examine current character sets and
collations#Run following SQL query on MySQL (preferably as a user other than
root) at the mysql promptshow variables where variable_name LIKE
"character_set%" OR variable_name LIKE "collation%";
//Edit /etc/my.cnf to change character-set#Paste the contents below into
my..cnf#TEXT BEGINSinit-connect = 'SET NAMES
utf8'character-set-server=utf8collation-server=utf8_general_cicharacter-set-client=utf8skip-character-set-client-handshake#TEXT
ENDS
//Restart MySQL, and verify the output after repeating query given earlier.
Your output should read like the one below:mysql> show variables where
variable_name LIKE "character_set%" OR variable_name LIKE
"collation%";+--------------------------+----------------------------+|
Variable_name | Value
|+--------------------------+----------------------------+|
character_set_client | utf8 ||
character_set_connection | utf8 || character_set_database
| utf8 || character_set_filesystem | binary
|| character_set_results | utf8 ||
character_set_server | utf8 || character_set_system
| utf8 || character_sets_dir |
/usr/share/mysql/charsets/ ||
collation_connection | utf8_general_ci || collation_database
| utf8_general_ci || collation_server | utf8_general_ci
|+--------------------------+----------------------------+11 rows in
set (0.02 sec)
#Remember to change character sets and collations before creating the database
you want, and not after
//You can set MySQL server to startup in particular 'run-levels' using the
command 'chkconfig'. For e.g.,
/sbin/chkconfig mysqld on
== MySQL install guide ENDS==
== MySQL backup/restore guide BEGINS==
//Back up databasemysqldump --tab=/path/to/some/dir --opt <databasename>
==OR==
mysqldump --add-drop-table -u<username> -p<password> -D <database_name> >
/path/to/backupfile.sql
#This can be automated via cron
//Restore database
mysql -u<username> -p<password> -D <database_name> < /path/to/backupfile.sql
Also, consider using the AutoMySQLBackup tool
(http://sourceforge.net/projects/automysqlbackup)
== MySQL backup/restore guide ENDS==
--- On Mon, 6/7/09, Nagananda <naganan...@gmail.com> wrote:
From: Nagananda <naganan...@gmail.com>
Subject: [Mifos-developer] Hi, again, Need help on moving mysql to linux
To: mifos-users@lists.sourceforge.net, mifos-develo...@lists.sourceforge.net
Date: Monday, 6 July, 2009, 5:48 PM
Hi all,
Back again for some more help!
Actually, we are running the mifos database on mysql 5.0.51b
on windows platform. Now we are planning to migrate the database to mysql on
linux.
So, we need help on
1.
Where do we find the mysql 5.0.51b [Mysql version of current
db] for linux installation. [any guides on linux installations – please
suggest]
2.
Also, if we were to migrate the data from the current
mysql on windows to mysql on linux, can we do a hard file copy of the database
from the windows to the linux datafile folder directly instead of backup and
restore. Our current db size is about 80Gig. Hence a full backup takes 5-6 hrs
and restoration takes atleast 14 hrs. We cannot afford this kind of downtime in
production as the only day available for the same is Sunday only. where as
hard copy of datafile can be done in 2 – 3 hrs.
3.
Please suggest if any options.
4.
Also, the replication server will be also our reporting
server which will be on windows. So can we do replication of mysql database from
linux to windows.
Thanking you all in advance for your support
Regards,
Nagananda Kumar. K.N
Asst. General Manager [Information
Technology]
Grameen Financial Services Pvt.
Ltd
Avalahalli, Anjanapura Post,
Bangalore
Karnataka
India
PinCode: 560062
Ph: 080-28436237, Fax: 080
28436577
Mob: 9845104252
Email:nagan...@grameenkoota.org
naganan...@gmail.com
Website: www.grameenkoota.org
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
See the Web's breaking stories, chosen by people like you. Check out
Yahoo! Buzz. http://in.buzz.yahoo.com/
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Mifos-users mailing list
Mifos-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mifos-users