yum groupinstall -y "Development Tools"
yum install -y cmake openssl-devel zlib-devel
yum install -y ncurses-devel

groupadd mysql

useradd mysql -g mysql
mkdir -p /usr/local/mysql
mkdir -p /db/mysql/data

mkdir -p /usr/software

chown -R mysql:mysql /usr/local/mysql
chown -R mysql:mysql /db/mysql/data
chown -R mysql:mysql /usr/local/mysql/.
chown -R mysql:mysql /db/mysql/data/.

echo "PATH=/usr/local/mysql/bin:/usr/local/mysql/lib:\$PATH" >> /etc/profile
echo "export PATH" >> /etc/profile

source /etc/profile

cd /usr/software/

yum install ntpdate -y

yum install wget -y

ntpdate time.windows.com && hwclock -w

#如果执行出错,试试下面这个命令

ntpdate -d time.nist.gov && hwclock -w

wget http://mirrors.neusoft.edu.cn/mariadb/mariadb-10.2.11/source/mariadb-10.2.11.tar.gz

tar -zxvf mariadb-10.2.11.tar.gz

cd /usr/software/mariadb-10.2.11
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_SPHINX_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/db/mysql/data -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=22066

make && make install

cp /usr/local/mysql/support-files/my-medium.cnf /etc/my.cnf

vi /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
:: localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.100 ffmpeg

检查一下是不是能正常查找到主机名称了:

/usr/local/mysql/bin/resolveip ffmpeg
IP address of ffmpeg is 192.168.1.100

cd /usr/local/mysql
scripts/mysql_install_db --user=mysql --datadir=/db/mysql/data

===============================================================
vi  /etc/my.cnf

[client]
port =
socket = /usr/local/mysql/mysql.sock [mysqld]
port =
socket = /usr/local/mysql/mysql.sock
skip-external-locking
skip-name-resolve
back_log =
max_connections =
max_connect_errors =
table_open_cache =
open_files_limit=
max_allowed_packet = 16M
binlog_cache_size = 1M
max_heap_table_size = 64M
read_buffer_size = 2M
read_rnd_buffer_size = 2M
sort_buffer_size = 2M
join_buffer_size = 2M
thread_cache_size =
query_cache_size = 64M
query_cache_limit = 4M
wait_timeout=
interactive_timeout=
ft_min_word_len =
default-storage-engine = InnoDB
thread_stack = 240K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 32M
log-bin=mysql-bin
expire_logs_days=
binlog_format=ROW
server-id =
slow_query_log
long_query_time =
log_bin_trust_function_creators=
group_concat_max_len=
lower_case_table_names=
innodb_file_per_table= #*** MyISAM Specific options
key_buffer_size = 32M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads =
myisam_recover_options=force,backup # *** INNODB Specific options ***
innodb_open_files=
innodb_buffer_pool_size = 2G
innodb_data_file_path = ibdata1:10M:autoextend
innodb_write_io_threads =
innodb_read_io_threads =
innodb_thread_concurrency =
innodb_flush_log_at_trx_commit =
innodb_log_buffer_size = 4M
innodb_log_file_size = 256M
innodb_log_files_in_group =
innodb_max_dirty_pages_pct =
innodb_lock_wait_timeout = [mysqldump]
quick
max_allowed_packet = 16M [mysql]
no-auto-rehash [myisamchk]
key_buffer_size = 512M
sort_buffer_size = 512M
read_buffer_size = 8M
write_buffer_size = 8M [mysqlhotcopy]
interactive-timeout [mysqld_safe]
open-files-limit =

配置自动启动

\cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql
chkconfig --level mysql on

===============================================================

service mysql start
chkconfig mysql on

mysqladmin -u root password 'dsideal'

service iptables stop
chkconfig iptables off

mysql -uroot -pdsideal

GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "dsideal";
flush privileges;

数据库的备份与还原

http://www.cnblogs.com/paul8339/p/6731688.html

CentOS6.5下安装MariaDB5.5.36的更多相关文章

  1. 【转载】CentOS6.5_X64下安装配置MongoDB数据库

    [转载]CentOS6.5_X64下安装配置MongoDB数据库 2014-05-16 10:07:09|  分类: 默认分类|举报|字号 订阅      下载LOFTER客户端 本文转载自zhm&l ...

  2. CentOS6.5下安装Apache2.4+PHP7

    CentOS6.5下安装Apache2.4+PHP7 http://blog.csdn.net/along602/article/details/42695779 http://www.th7.cn/ ...

  3. CentOS6.5下安装apache2.2和PHP 5.5.28

    CentOS6.5下安装apache2.2 1. 准备程序 :httpd-2.2.27.tar.gz 下载地址:http://httpd.apache.org/download.cgi#apache2 ...

  4. CentOS6.5下安装配置MySQL

    CentOS6.5下安装配置MySQL,配置方法如下: 安装mysql数据库:# yum install -y mysql-server mysql mysql-deve 查看mysql-server ...

  5. 在CentOS6.8下安装Docker

    在CentOS6.8下安装Docker 一.查看系统版本 [root@localhost opt]# uname -a Linux localhost.localdomain -.el6.x86_64 ...

  6. coreseek/sphinx CentOS6.4下安装

    一.在CentOS6.4下安装coreseek之前需要预先安装以下软件 1.打开终端 输入 su 获取管理员权限 2.输入命令 yum install make gcc g++ gcc-c++ lib ...

  7. 建站笔记1:centos6.5下安装mysql

    近期买了个域名,想要玩玩自己建站点:接下来遇到的问题都会一次记录下来.以备自己以后复习查看: 首先建站方案选择: wordPress +centos6.5 +mysql; server买的:搬瓦工最低 ...

  8. centos6.7下安装配置vnc

    vnc是一款使用广泛的服务器管理软件,可以实现图形化管理,下面简单介绍一下如何在centos6.7下安装vnc. 1.安装vncserver yum install tigervnc tigervnc ...

  9. CentOS6.5下安装JDK1.7+MYSQL5.5+TOMCAT7+nginx1.7.5环境安装文档

    ----------------CentOS6.5下安装JDK1.7+MYSQL5.5+TOMCAT7+nginx1.7.5环境安装文档----------------------- [JDK1.7安 ...

随机推荐

  1. javascript对象之 selectionStart selectionEnd

    <script> function inserttag(){ var text=document.getElementById('con'); text.focus(); var star ...

  2. Ajax请求内嵌套Ajax请求的方法

    前段时间做项目,需要把全国省市的两个XML文件整合成一个JSON格式的数据,手写的话觉得数据太多了,而且容易出错,于是就想到了用Ajax嵌套的方法来解决,就想平时用Ajax的方法直接嵌套,都会先读出外 ...

  3. Printf 格式化简要总结

    格式代码 A ABC ABCDEFGH %S A ABC ABCDEFGH %5S ####A ##ABC ABCDEFGH %.5S A ABC ABCDE %5.5S ####A ##ABC AB ...

  4. hibernate建表 一对多 多的一方控制一的一方

    一对多 单向<one-to-many>通过calss操作student 外键在student表中,所以外键由student维护<many-to-one>通过student操作c ...

  5. Linux常用文件管理命令

    Command Description cat filename 查看文件内容. cd dirname 改变所在目录. cp file1 file2 复制文件或目录. file filename 查看 ...

  6. JS 实现 ResizeBar,可拖动改变两个区域(带iframe)大小

    将网页化成两个区域,左边区域是一个树结构,右边区域是一个iframe,点击左边区域时,右边区域加载页面.实现功能:在两个区域间加一个可拖动条,拖动时改变左右两个区域的大小.在Google上搜索slid ...

  7. Python 中的 is 和 id

    (ob1 is ob2) 等价于 (id(ob1) == id(ob2)) 首先id函数可以获得对象的内存地址,如果两个对象的内存地址是一样的,那么这两个对象肯定是一个对象.和is是等价的.Pytho ...

  8. 33条C#、.Net经典面试题目及答案

    33条C#..Net经典面试题目及答案[zt] 本文集中了多条常见的C#..Net经典面试题目例如".NET中类和结构的区别"."ASP.NET页面之间传递值的几种方式? ...

  9. 设计模式 单件-Singleton

    单件模式 Singleton 什么时候使用?当需要独一无二的对象时,请想起他. 举例:线程池(threadpool),缓存(cache),对话框,处理偏好设置和注册表(registry)的对象,驱动程 ...

  10. 基于Heritrix的特定主题的网络爬虫配置与实现

    建议在了解了一定网络爬虫的基本原理和Heritrix的架构知识后进行配置和扩展.相关博文:http://www.cnblogs.com/hustfly/p/3441747.html 摘要 随着网络时代 ...