CentOS6.9下安装MariaDB10.2.11
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
最新文章
- UI内侧错题
- DevExpress GridView对表格的部分说明
- (转载)Go语言开发环境配置
- XMLHttpRequest的POST中文表单问题解决方案
- 关于C++类中的成员
- hdu 1063 Exponentiation (高精度小数乘法)
- hitTest:withEvent:方法(此方法可实现点击穿透、点击下层视图功能)
- pinyin4j的使用
- 小程序--改变子级别页面导航栏信息 / navigationBarTitleText
- windows安装设备的驱动程序软件遇…
- 解决阿里云服务器3306端口无法访问的问题(windows server 2008r2)
- 一种使用GDI+对图片尺寸和质量的压缩方法
- java注解细节
- Troubleshooting SQL Server RESOURCE_SEMAPHORE Waittype Memory Issues
- vs 基本验证控件使用
- RedHat 7.0更新升级openSSH7.4p1
- ABP框架系列之三十八:(NHibernate-Integration-NHibernate-集成)
- MachineLearning ---- lesson 2 Linear Regression with One Variable
- Ubuntu删除文件夹的命令
- Verilog 基础回顾 (一)