mysql install and config

Install MySQL Server

Install MySQL Server 5.1.30 in the machine where you want to store the StoreGrid Backup Server's metadata.

   1. Download the MySQL server (mysql-5.1.30.tar.gz) file from the URL http://downloads.mysql.com/archives.php?p=mysql-5.1&v=5.1.34
   2. Extract the tar file by executing 'tar -xzvf mysql-5.1.30.tar.gz'
   3. Go the extracted folder by executing 'cd mysql-5.1.30'
   4. Execute './configure --enable-thread-safe-client --with-plugins=max --with-gnu-ld' (Assuming you have all the appropriate stuff like gcc, g++, make, etc.,)
   5. Execute 'make'
   6. Execute 'make install' as root user. By default, this will install MySQL in /usr/local.
   7. Copy the MySQL configuration file by executing 'cp support-files/my-medium.cnf /etc/my.cnf' as root user.
   8. Open the '/etc/my.cnf' file and edit the settings as follows :

      [mysqld]
      socket=/tmp/mysql.sock
      user=root
      default-storage_engine=innodb
      max_connections=800
      slow_query_log = 1
      innodb_log_file_size = 512M
      transaction-isolation = READ-COMMITTED
      innodb_flush_method=O_DIRECT
   9. Execute 'mysql_install_db' to install and set up the system tables.
  10. Copy the MySQL daemon script file by executing the command 'cp support-files/mysql.server /etc/init.d/mysql' as root user.
  11. Change mode for the daemon file by executing the command 'chmod 755 /etc/init.d/mysql' as root user.
  12. Add the MySQL daemon by executing the command '/sbin/chkconfig --add mysql' as root.
  13. Start MySQL Server by executing '/etc/init.d/mysql start'.
  14. Set the root password for MySQL Server by executing 'mysqladmin -u root password [mysql_root_password]' where [mysql_root_password] is the password for the MySQL root user.

Install MySQL Client

StoreGrid Backup server uses the MySQL client program to connect to the MySQL Server. Hence, you need to install the MySQL 5.1.30 client in the backup server.

Note: If you have installed the MySQL Server in your StoreGrid backup server machine itself, then please ignore this step.

For backup/replication server running in 32 bit machine :

   1. Extract the MySQL installer file by executing 'tar -xzvf mysql-5.1.30.tar.gz'
   2. Go to the extracted folder by executing 'cd mysql-5.1.30'
   3. Execute the command './configure --enable-thread-safe-client --enable-gui=no --without-server --with-plugins=max --with-gnu-ld'
   4. Execute 'make'
   5. Execute 'make install' as root user

For backup/replication server running in 64 bit machine :

   1. Login as root user and execute yum install mysql.i386
   2. This will install 32 bit MySQL client in your 64 bit machine.
 

你可能感兴趣的:(mysql,PHP,socket,gcc,Go)