xcat-core/xCAT-client/pods/man8/mysqlsetup.8.pod
2009-11-05 20:40:16 +00:00

101 lines
4.3 KiB
Plaintext

=head1 NAME
B<mysqlsetup> - Sets up the MySQL database for xCAT to use.
=head1 SYNOPSIS
B<mysqlsetup> {B<-h>|B<--help>}
B<mysqlsetup> {B<-v>|B<--version>}
B<mysqlsetup> {B<-i>|B<--init>} [B<-f>|B<--hostfile>] [-o|--setupODBC] [B<-V>|B<--verbose>]
B<mysqlsetup> {B<-u>|B<--update>} [B<-f>|B<--hostfile>] [-o|--setupODBC] [B<-V>|B<--verbose>]
B<mysqlsetup> {B<-o>|B<--setupODBC>} [-V|--verbose]
=head1 DESCRIPTION
B<mysqlsetup> - Sets up the MySQL database for xCAT to use. The mysqlsetup script is run on the Management Node as root after the MySQL code has been installed./nBefore running the init option, the MySQL server should be stopped. The xCAT daemon xcatd must be running, do not stop it. No xCAT commands should be run during the init process, because we will be migrating the xCAT database to MySQL and restarting the xcatd daemon as well as the MySQL daemon. /n For full information on all the steps that will be done, read the "Configure MySQL and Migrate xCAT Data to MySQL" sections in http://xcat.svn.sourceforge.net/viewvc/xcat/xcat-core/trunk/xCAT-client/share/doc/xCAT2.SetupMySQL.pdf./n/nTwo passwords must be supplied for the setup, a password for the xcatadmin id and a password for the root id in the MySQL database. These will be prompted for interactively, unless the environment variables XCATMYSQLADMIN_PW and XCATMYSQLROOT_PW are set to the passwords for the xcatadmin id and root id in the database,resp.
=head1 OPTIONS
=over 6
=item B<-h|--help>
Displays the usage message.
=item B<-v|--version>
Displays the release version of the code.
=item B<-V|--verbose>
Displays verbose messages.
=item B<-i|--init>
The init option is used to setup an installed MySQL database so that xCAT can use the database. This involves creating the xcatdb database, the xcatadmin id, dllowing access to the xcatdb database by the Management Node. It customizes the my.cnf configuration file for xcat and starts the MySQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb MySQL database. It create the /etc/xcat/cfgloc file to point the xcatd daemon to the MySQL database and restarts the xcatd daemon using the database./nOn AIX, it additionally setup the mysql id and group and corrects the permissions in the MySQL install directories. /n For AIX, you should be using the MySQL rpms available from the xCAT website. For Linux, you should use the MySQL rpms shipped with the OS. You can chose the -f and/or the -o option, to run after the init.
=item B<-u|--update>
To run the update option, you must first have run the -i option and have xcat successfully up and running on the MySQL database. You can chose the -f and/or the -o option, to run update.
=item B<-f|--hostfile>
This option run during update, will take all the host from the input file, and give them database access to the xcatdb in MySQL for the xcatadmin id. Wildcards and ipaddresses may be used. xCAT must have been previously successfully setup to use MySQL.
=item B<-o|--setupODBC>
This option sets up the ODBC /etc/../odbcinst.ini, /etc/../odbc.ini and the .odbc.ini file in roots home directory will be created and initialized to run off the xcatdb MySQL database.
See "Add ODBC Support" in the http://xcat.svn.sourceforge.
net/viewvc/xcat/xcat-core/trunk/xCAT-client/share/doc/xCAT2.SetupMySQL.pdf
=back
=head1 ENVIRONMENT VARIABLES
=over 2
=item *
B<XCATMYSQLADMIN_PW> - the password for the xcatadmin id that will be assigned in the MySQL database.
=item *
B<XCATMYSQLROOT_PW> - the password for the root id that will be assigned to the MySQL root id, if the script creates it. The password to use to run MySQL command to the database as the MySQL root id. This password may be different than the root password on the Management Node.
=back
=head1 EXAMPLES
=over 2
=item *
To setup MySQL for xCAT to run on the MySQL xcatd database :
B<mysqlsetup> I<-i>
=item *
To add hosts from /tmp/xcat/hostlist that can access the xcatd database in MySQL:
B<mysqlsetup> I<-u> I<-f /tmp/xcat/hostlist>
=item *
To setup the ODBC for MySQL xcatdb database access :
B<mysqlsetup> I<-o>
=item *
To setup MySQL for xCAT and add hosts from /tmp/xcat/hostlist and setup the ODBC in Verbose mode:
B<mysqlsetup> I<-i> I<-f /tmp/xcat/hostlist> I<-o> I<-V>
=back