centos mysql-5.5.20_mysql-5.5.20+CentOS 6.2 编译安装全过程详解(2)
十二、查看端口、测试、应用 Mysql:
netstat -nat
mysql -uroot -p
mysql> show processlist; -- 查看当前正在执行的任务
mysql> show variables; -- 查看系统变量
mysql> show variables like 'max%'; -- 查看max开头的系统变量
mysql> show status; -- 查看当前系统状态
mysql> show status like 'qcache%'; -- 查看与qcache相关的系统状态
mysql> show status like 'max%'; -- 查看与max相关的系统状态
mysql> show master status; -- 查看主从关系中主服务器状态
mysql> show slave status; -- 查看主从关系中从服务器状态
至此,可以使用MYSQL了,如果需要开放3306端口,则:
CENTOS打开3306端口:
加入#/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
保存#/etc/rc.d/init.d/iptables save
查看打开的端口# /etc/init.d/iptables status 【或#service iptables status】
********************************************************************************
附1:my.cnf配置参考:
********************************************************************************
# 优化 Mysql 配置文件
# 以4核cpu 8G内存的硬件配置来优化参数: vim /etc/my.cnf
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL.
# .............略掉注释
[client]
#password = your_password
port = 3306
socket = /usr/local/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /usr/local/mysql/mysql.sock
datadir=/mysqldata
basedir=/usr/local/mysql
skip-name-resolve #此参数务必加,否则远程连接会很慢。
skip-external-locking
key_buffer_size = 4096M
max_allowed_packet = 2M
table_open_cache = 1024
sort_buffer_size = 2M
read_buffer_size = 32M
read_rnd_buffer_size = 32M
myisam_sort_buffer_size = 128M
thread_cache_size = 64
query_cache_size = 128M
lower_case_table_names = 1
skip-name-resolve
max_connections = 1024
character-set-server = utf8
collation-server = utf8_general_ci
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
# Replication Master Server (default)
# binary logging is required for replication
log-bin=mysql-bin
expire_logs_days = 10
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
server-id = 1
# 以下这些参数可开启。如果应用程序要用到innodb表的话。
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/data
#innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
#innodb_log_group_home_dir = /usr/local/mysql/data
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 384M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 100M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 32M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 1024M
sort_buffer_size = 512M
read_buffer = 32M
write_buffer = 64M
[mysqlhotcopy]
interactive-timeout
****************************************************************************
附2:可能出现的错误:
****************************************************************************
0、make编译过程中,如出现“警告:提领类型双关的指针将破坏强重叠规则”错误,可以忽略。
#以下错误在centos6.2(已配置好gcc)不会出现。主要是针对centOS5.6之类的系统:
1、错误:Could NOT find Curses
先删除掉CMakeCache.txt ,再yum install ncurses-devel即可。
[root@localhost mysql-5.5.20]# rm CMakeCache.txt
2:出现如下错误:
/usr/local/src/mysql-5.5.20/sql/mysqld.cc: In function ‘void handle_connections_sockets()’:
/usr/local/src/mysql-5.5.20/sql/mysqld.cc:5131: 错误:从类型 ‘size_socket*’ 到类型 ‘socklen_t*’ 的转换无效
/usr/local/src/mysql-5.5.20/sql/mysqld.cc:5131: 错误: 初始化实参 3,属于 ‘int accept(int, sockaddr*, socklen_t*)’
/usr/local/src/mysql-5.5.20/sql/mysqld.cc:5198: 错误:从类型 ‘int*’ 到类型 ‘socklen_t*’ 的转换无效
/usr/local/src/mysql-5.5.20/sql/mysqld.cc:5198: 错误: 初始化实参 3,属于 ‘int getsockname(int, sockaddr*, socklen_t*)’
make[2]: *** [sql/CMakeFiles/sql.dir/mysqld.cc.o] 错误 1
make[1]: *** [sql/CMakeFiles/sql.dir/all] 错误 2
make: *** [all] 错误 2
--------------------------------
这个是gcc的版本问题,
安装GCC4.4.6【镜像站点gcc-4.6.2编译时有问题】
1.对gcc-4.4.6.tar.gz解压configure,configure出错,需要安装3个依赖包gmp、mpfr和MPC。
由于MPFR依赖GMP,而MPC依赖GMP和MPFR,所以要先安装GMP,其次MPFR,最后才是MPC。
gcc版本太旧会出现:msqld.cc.o错误,安装最新版http://gcc-uk.internet.bs/releases/【镜像站点gcc-4.6.2编译时有问题,因此不建议用更新的版本4.6.2】,
【注:centOS6.2不需要再安装GCC以及以下3个软件了】
1、 GMP,下载:http://gmplib.org/
2、 MPFR:下载:http://www.mpfr.org/mpfr-3.0.0/mpfr-3.0.0.tar.bz2
3、 MPC 0.9【0.8.1不行】下载:http://www.multiprecision.org/?prog=mpc&page=download
详细安装GCC参http://hi.baidu.com/traindiy/blog/item/0ad6cc5cfb26645cfaf2c05e.html
1.1安装GMP
gmp安装gmp-4.3.2.tar.gz
./configure --prefix=/usr/local/gmp
make
make install
1.2安装MPFR
MPFR安装mpfr-3.0.0.tar.bz2
注意configure时候,加入
./configure --with-gmp=/usr/local/gmp --prefix=/usr/local/mpfr,因为mpfr需要gmp。
1.3安装MPC:
./configure --prefix=/usr/local/mpc --with-gmp=/usr/local/gmp --with-mpfr=/usr/local/mpfr
2.解压后目录gcc-4.4.6,具体安装参http://hi.baidu.com/traindiy/blog/item/0ad6cc5cfb26645cfaf2c05e.html
注意:如果需要把/usr/local/lib路径加入到/etc/ld.so.conf中。进一步执行ldconfig.
centos mysql-5.5.20_mysql-5.5.20+CentOS 6.2 编译安装全过程详解(2)相关推荐
- mysql 5.5 编译安装教程,Centos6下mysql 5.5.* 编译安装步骤详解
MySQL5.5的源码编译采用cmake,与此前的版本有所区别,下面是一次完整的编译安装过程: 1.下载 wget http://dev.mysql.com/get/Downloads/MySQL-5 ...
- Mysql高手系列 - 第20篇:异常捕获及处理详解(实战经验)
Mysql高手系列 - 第20篇:异常捕获及处理详解(实战经验) 参考文章: (1)Mysql高手系列 - 第20篇:异常捕获及处理详解(实战经验) (2)https://www.cnblogs.co ...
- 《MySQL安装流程详解》及《MySQL安装一直失败,重新安装显示已安装》
<MySQL安装流程详解>及<MySQL安装一直失败,重新安装显示已安装> 本文由博主经过查阅网上资料整理总结后编写,如存在错误或不恰当之处请留言以便更正,内容仅供大家参考学习 ...
- mysql安装包没有安装程序_MySQL5.6的zip包安装教程详解
之前我们都是后缀为.msi的文件,换言之就是傻瓜式安装,但是有些版本不容易控制安装路径,或者数据库编码格式,还有些会安装很多无用的服务,但是都没有后缀为.zip文件简单直接,说是在哪里,就在哪里. 1 ...
- CentOS下DB2数据库安装过程详解
这篇文章主要介绍了CentOS下DB2数据库安装过程详解,本文步骤详细,操作的命令也比较全 安装前请查看DB2版本和许可证说明来增加了解,先弄明白改安装什么版本,这里我用的是最新的Express-C版 ...
- 第一章笔记MySQL数据库的安装目录详解
MySQL数据库的安装目录详解 bin目录:用于存放一些可以执行的文件,如mysql.exe;,mysqld.exe;mysqlshow.exe等. data目录:用于存放一些日志文件以及数据库. i ...
- 第 20、21、22节 事件详解
第20.21.22节 事件详解.Linq 详解 初步了解事件 事件的应用 事件的声明 事件与委托的关系 初步了解事件 事件的功能 = 通知 + 可选的事件参数(即详细信息) 定义:单词 Event,译 ...
- centos 安装mysql-proxy_详解在Centos 5.2下安装最新Mysql Proxy LUA教程
在Centos 5.2下安装***Mysql Proxy LUA教程是本文要介绍的内容,主要是来了解Mysql Proxy LUA的安装过程,文章中有很详细的讲解,具体内容来看本文详解. mysql ...
- MySQL 8.0.22 源码编译安装全过程
墨墨导读: Mysql的8.0版本出来已经有一段时间了,近期研究下源码调试.整个编译过程越来越复杂了. 近期研究下源码调试,MySQL5.7版本源码安装还是比较简单的,有很多例子参考.所以这次选择My ...
最新文章
- python怎么学最快-python怎么快速自学?
- 史上最强《Java 开发手册》泰山版王者归来
- 站在BERT肩膀上的NLP新秀们(PART II)
- 百分点董事长苏萌:大数据落地有五大要素
- admysqlslap压力测试
- 数值变量分类问题相关原理知识
- 软件测试c语言笔试题目,软件测试笔试题库及答案.docx
- 用excel将有规律的数据随机打乱
- Android 开机加速优化
- 计算机二级C语言选择题——01
- 程序人生 - 车辆年检与费用你知道多少?
- [BZOJ4466][Jsoi2013]超立方体
- SharePoint is Dying
- chrome的APP模式与全屏模式 --app --kiosk
- Java学习总结第一阶段
- 20230306 作业
- JAVA word转pdf高清无乱码版本(图片也可以的)
- protocol method: #method<connection.close>(reply-code=530, reply-text=NOTALLOWED - vhost / not found
- Kubernetes之Job
- Java学习第二周总结
热门文章
- python3怎么安装docx_如何在 Python 3.4 上安装 python-docx
- 英魂之刃服务器维护中修改,英魂之刃gg修改教程 | 手游网游页游攻略大全
- 实验2-4-3 求平方根序列前N项和 (C语言)
- MySQL多个条件更新多个字段
- java邮箱正则表达式_Java正则表达式详解
- 关于Python常见功能使用的博客收藏
- spring里restTemplate向目的URL发送post请求
- Unity中Camera的Clear flags,Culling Mask,Depth参数
- 通过字符串方法创建新字符串如何打出反斜杠、单引号、双引号、响铃、换行符、水平制表符
- F10-MYSQL的yum源码