[Practice] install maridb10.0.15oncentos6.5

Source: Internet
Author: User
Maridb10.0.15oncentos6.5 install ************************************** **************************************** 1. system ************************************** **************************************** -------- 1. install desktop and select Custom

Maridb 10.0.15 on centos 6.5 installation ********************************** **************************************** * *** 1. system ************************************** **************************************** -------- 1. install desktop and select Custom

Maridb 10.0.15 on centos 6.5 installation ********************************** **************************************** * *** 1. system ************************************** **************************************** -------- 1. desktop installation, select the following two customized packages, others choose base systemlegacy unix compatibility (rsh telnet ksh tftp) Customized topslegacy x window system compatibility (xorg-x11-xdm) ------- 2 configure yum source cd/etc/yum. repos. dmv CentOS-Base.repo CentOS-Base.repo.oldwget http://mirrors.163.com/.help/CentOS6-Base-163.repoyum Makecache checks updatable rpm packages # yum check-update updates all rpm packages # yum update --- 3. XDM configuration --- 3.1 centos 6.5 1 ). install XDMyum install xdm 2 ). vi/etc/X11/xdm/Xaccess49 * # any host can get a login window3 ). modify/etc/TPD/custom. conf file. Vi/etc/TPD/custom. conf [xdmcp] Enable = trueDisplaysPerHost = 5 Port = 177 [security] AllowRemoteRoot = true4 ). restart the running of the domain name machine (GMS) Service/usr/sbin/GMS-restart --- 4. disable the firewall chkconfig -- level 123456 iptables offservice iptables stop --- 5. modify hostsvi/etc/hosts192.168.0.128sphinx.ocp.com sph ********************************* **************************************** * ***** 2. for mysql installation ************************************* ******************** ********************** 1: uninstall the old version and run the following command to check whether MySQL Serverrpm-qa is installed | if grep mysql is installed, run the following command to uninstall rpm-e mysql // normal deletion mode rpm-e -- nodeps mysql // strong deletion mode, if the preceding command is used to delete other dependent files, you can use this command to forcibly delete them. 2: install MySQL1. install the yum-y install cmake gcc-c ++ autoconf automake zlib * libxml * \ ncurses-devel libtool-ltdl-devel * make bison- devel libaio 2. create a group and user groupadd mysqluseradd-g mysql 3 for mysql. set User System Resources Restriction # vi/etc/security/limits. confmysql soft nproc 2047 mysql hard nproc 16384 mysql soft nofile 1024 mysql hard nofile 655364. compile and install tar xvf mariadb-10.0.15.tar.gzcd mariadb-10.0.15 compile and install cmake \-DCMAKE_INSTALL_PREFIX =/usr/local/mysql \-DMYSQL_DATADIR =/usr/local/mysql/data \-DMYSQL_UNIX_ADDR =/usr/local/ mysql/mysql. sock \-DSYSCONFDIR =/etc \-DWITH_INNOBASE_STORAGE_ENGINE = 1 \-DWITH_MYISAM_STORAGE_ENGINE = 1 \-Diffusion Rows = 1 \-rows = 1 \-rows = 1 \-DWITH_READLINE = 1 \-DENABLED_LOCAL_INFILE = 1 \-DDEFAULT_CHARSET = utf8 \-DDEFAULT_COLLATION = utf8_general_ci \-rows = all \- DENABLED_LOCAL_INFILE = 1 \-DWITH_PARTITION_STORAGE_ENGINE = 1 \-DEXTRA_CHARSETS = all \-DMYSQL_TCP_PORT = 3306 \-DWITH_DEBUG = 0 make install the entire process takes about 30 minutes. 3. Configure MySQL1. Modify/usr/local/m. Ysql permission # mkdir-p/usr/local/mysql2. create a data file, temporary file mkdir/usr/local/mysql/{innodb_data, data, tmp}-pmkdir/usr/local/mysql/mysql_logs/{binary_log, innodb_log, query_log, slow_query_log, error_log}-p3. modify the permission chown-R mysql/usr/local/mysqlchgrp-R mysql/usr/local/mysql4. modify the parameter # rm-rf/etc/my. cnf # vi/usr/local/mysql/my. cnf # Link file # ln-s/usr/local/mysql/my. cnf/etc/my. cnfll/etc/my. cnf lrwxrwxrwx. 1 root 23 No V 18 :30/etc/my. cnf->/usr/local/mysql/my. cnf5. initialize the database cd/usr/local/mysql/scripts #. /mysql_install_db -- defaults-file =/etc/my. cnf -- user = mysql -- basedir =/usr/local/mysql \ -- datadir =/usr/local/mysql/data /************* * ******* note: when starting the MySQL service, I will search for my. cnf, 1 ). /etc/my. cnf2 ). /etc/mysql/my. cnf3 ). SYSCONFDIR/my. cnf4 ). $ MYSQL_HOME/my. cnf5 ). defaults-extra-file6 ). ~ /. My. cnf7 ).~ /. Mylogin. cnf *********** if ults-file is not specified, the following error may occur: [Warning] InnoDB: Cannot open table mysql/slave_master_info [Warning] InnoDB: cannot open table mysql/slave_worker_info [Warning] InnoDB: Cannot open table mysql/slave_relay_log_info *****************/provides binary files, library file, header file, man manual echo 'export PATH =/data/apps/mysql/bin: $ path'>/etc/profile. d/mysql. shecho '/data/apps/mysql/lib'>/etc/ld. so. conf. d/mysql. confln-s V/usr/local/include/usr/include/mysqlecho 'manpath/data/apps/mysql'>/etc/man. configman-M/data/apps/mysql/man mysqld -- make the man manual take effect immediately 6. start MySQL to add a service and copy the service script to init. d directory, and set boot cd/usr/local/mysql/cp support-files/mysql. server/etc/init. d/mysqlchkconfig mysql onservice mysql start 7. after configuring mysql user MySQL to start successfully, the root user has no password by default. We need to set the root password. 7.1 modify the/etc/profile file and add # vi/etc/profilePATH =/usr/local/mysql/bin: $ PATHexport PATH # source/etc/profile at the end of the file, you can enter mysql directly in the terminal. In the mysql environment, run the following command to change the root password-7.2 modify the mysql administrator password-Method 1: mysql-uroot-h127.0.0.1-pSET PASSWORD = PASSWORD ('Password'); flush privileges; -- 7.3 log on to mysql # mysql-uroot-ppassword -- 7.4 set mysql user security (not applicable) select user, host from mysql. user; delete from mysql. user where (user, host) not in (sele Ct 'root', 'localhost'); # modify the root user name and password to update mysql. user set user = 'system', password = password ('Password') where user = 'root'; truncate table mysql. db; # create an administrator's syntax grant all on *. * to 'root' @ '%' identified by "password" with grant option; -- 7.5 set remote access for root users -- Method 1: granting mysql> grant all privileges on *. * TO 'root' @ '%' identified by 'Password' with grant option; flush privileges; select host, user, password from mys Ql. user; -- Method 2: Modify the table mysql> update user set host = '%' where user = 'root'; mysql> flush privileges; ---- 7.6 set the linux script vi ~ /. Bash_profile # ocpyang setalias mysql = "mysql-uroot-ppassword -- auto-rehash" alias errorlog = "cat/usr/local/mysql/mysql_logs/error_log/error. log "alias mycnf =" cd/usr/local/mysql "export PATH =/usr/local/mysql/scripts: $ PATHsource ~ /. Bash_profile ---- 7.7 modify the permission chown-R mysql/usr/local/mysqlchgrp-R mysql/usr/local/mysql ---- Common Startup error or warning cat/usr/local/mysql/mysql_logs/ error_log/error. log Warning] 'proxies _ priv' entry '@ % root@sphinx.ocp.com' ignored in -- skip-name-resolve mode. solution: delete from mysql. proxies_priv where host = 'hsf-.ocp.com '; commit; flush privileges;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.