Mysql (1) Installation of mysql 1. Installation of Mysql 2. Installation of mysqldata Library first download of mysqlinstallation package mysql-5.0.85.tar.tar
Upload the downloaded installation package to the/usr/sid/mysql directory of Linux and perform the following steps: Install www.2cto.com: -- enter the Mysql installation directory cd/usr/sid/mysql -- add a Mysql group groupadd mysql -- add a Mysql user useradd-g Mysql mysql installation in the mysql group: -- unzip the Mysql installation package tar zxvf mysql-5.0.85.tar.tar -- enter the mysql-5.0.85 directory cd mysql-5.0.85 -- configure the Mysql installation path and related parameters. /configure -- prefix =/usr/local/sunnyboysac/mysql-with-extra-charsets = gbk-with-extra-charsets = all-with-named-curses-libs =/usr /lib/libn Curses. so.5-with-innodb -- compile make -- install make install configuration steps: -- enter the mysql decompressed directory cd mysql-5.0.85 -- copy the file cp support-files/my-large.cnf/etc/my. cnf vi/etc/my. add a line of default-storage-engine = INNODB to the cnf modification content and annotate innodb (#) the modified form is removed from the rewrite part. # bdb_max_lock = 100000default-storage-engine = INNODB # Uncomment the following if you are using InnoDB tables =/usr/local/eetrust/mysql/var/innodb_data_file_path = Ibdata1: 10 M: autoextendinnodb_log_group_home_dir =/usr/local/eetrust/mysql/var/innodb_log_arch_dir =/usr/local/eetrust/mysql/var/# You can set .. _ buffer_pool_size up to 50-80% # of RAM but beware of setting memory usage too highinnodb_buffer_pool_size = 256Minnodb_additional_mem_pool_size = 20 M # Set .. _ log_file_size to 25% of buffer pool sizeinnodb_log_file_size = 64Minnodb_log_buffer_size = 8Minnodb_flush_log_at_trx_commit = 1innodb_lock_wait_timeout = 50 <! -- EndFragment --> www.2cto.com enter the mysql directory cd/usr/local/eetrust/mysql/bin to add the user mysql. /mysql_install_db -- user = mysql -- set the user password. /mysqld_safe -- user = mysql &. /mysqladmin-u root password sunnyboysac -- set mysql to self-start -- enter the extract directory -- copy the file cd/usr/sid/mysql/mysql-5.0.85cp support-files/mysql. server/etc/rc. d/init. d/mysql -- modify the permission cd/etc/rc. d/init. dchmod + x/etc/rc. d/init. d/mysql -- set self-starting chkconfig -- add mysqlchkconfig mysq L on -- add mysql bin to the path of/etc/profile vi/etc/profile -- Add the following content after path: /usr/local/eetrust/mysql/bin -- application source/etc/profilemysql-uroot-psunnyboysac -- grant permissions to mysql root users so that they can remotely access grant all on *. * to 'root' @ '%' identified by 'mysqladmin'; grant all on *. * to 'root' @ '%' identified by 'sunnyboysac '; grant usage on *. * to root @ '%' identified by 'sunnyboysac '; -- refresh flush privileges. If the Firewall service iptables s cannot be connected Top www.2cto.com verification: service mysql start exit window re-login with mysql Command <! -- EndFragment --> <! -- EndFragment --> <! -- EndFragment -->