mysql5.5.6配置_mysql 5.5.6 源码安装配置

http://dev.mysql.com/doc/refman/5.6/en/index.htmlmysql官网安装手册http://dev.mysql.com/doc/refman/5.6/en/source-configuration-options.html源码安装说明

[root@mysql-a mysql]#  vim /etc/my.cnf

[mysqld]

datadir=/data/

[root@web2_lnmp mysql]# /etc/init.d/mysql start

Starting MySQL... SUCCESS!

Mysql 启动报错总结:

[root@mysql-a mysql]#  /etc/init.d/mysql restart

ERROR!MySQL server PID file could not be found!

Starting MySQL... ERROR! The server quitwithout updating PID file (/data/mysql-b.pid).

[root@web2_lnmp mysql]# ps -ef |grep mysql

root     47351      1  0 00:32 pts/1    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe--datadir=/data

--pid-file=/data//web2_lnmp.pid

mysql    47527  47351  0 00:32 pts/1    00:00:01 /usr/local/mysql/bin/mysqld--basedir=/usr/local/mysql --datadir=/data/--plugin-dir=/usr/local/mysql/lib/plugin --user=mysql --log-error=/var/log/mysqld.log--pid-file=/data//web2_lnmp.pid --socket=/var/lib/mysql/mysql.sock

root     47610   2817  0 00:48 pts/1    00:00:00 grep mysql

[root@mysql-a mysql]#  kill 25588

[root@mysql-a mysql]#  kill 25689

[root@mysql-a mysql]#  ps -ef|grep mysql

root     26111   5590  0 08:05 pts/0    00:00:00 grep mysql

[root@mysql-a mysql]#  /etc/init.d/mysql restart

Shutting down MySQL. SUCCESS!

Starting MySQL. SUCCESS! 启动ok

如果/etc/my.cnf 没有生成,拷贝模板过去参照官网进行修改

[root@mysql-b mysql]# cp support-files/my-default.cnf/etc/my.cnf

编译的时候我指定配置文件的路径了,但是没有生成,拷贝一个模板到/etc/

修改/etc/init.d/mysql 的启动脚本

如果启动报错:

[root@mysql-a mysql]# /etc/init.d/mysqlrestart

ERROR!MySQL server PID file could not be found!

Starting MySQL.. ERROR! The server quitwithout updating PID file (/var/lib/mysql/mysql-a.pid).

解决方法:

[root@mysql-a mysql]# cp support-files/my-default.cnf/etc/my.cnf

[root@mysql-a mysql]# /etc/init.d/mysql restart

ERROR! MySQLserver PID file could not be found!

Starting MySQL. SUCCESS!

然后去修改配置文件

默认的my.cnf

[root@mysql-a mysql]# cat support-files/my-default.cnf

# For advice on how to change settings please see

#

# *** DO NOT EDIT THIS FILE. It's a template which willbe copied to the

# *** default location during install, and will bereplaced if you

# *** upgrade to a newer version of MySQL.

[mysqld]

# Remove leading # and set to the amount of RAM for themost important data

# cache in MySQL. Start at 70% of total RAM for dedicatedserver, else 10%.

# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important dataintegrity option: logging

# changes to the binary log between backups.

# log_bin

# These are commonly set, remove the # and set asrequired.

# basedir = .....

# datadir = .....

# port = .....

# server_id = .....

# socket = .....

# Remove leading # to set options mainly useful forreporting servers.

# The server defaults are faster for transactions andfast SELECTs.

# Adjust sizes as needed, experiment to find the optimalvalues.

# join_buffer_size = 128M

# sort_buffer_size = 2M

# read_rnd_buffer_size = 2M

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[root@mysql-a mysql]# diff /etc/my.cnfsupport-files/my-default.cnf

2a3,5

> # *** DO NOT EDIT THIS FILE. It's a template whichwill be copied to the

> # *** default location during install, and will bereplaced if you

> # *** upgrade to a newer version of MySQL.

15,19c18,22

---

> # basedir = .....

> # datadir = .....

> # port = .....

> # server_id = .....

> # socket = .....

29,31d31

[root@mysql-a mysql]# mysql -uroot   登陆成功,mysql的安装完成

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 1

Server version: 5.6.23 Source distribution

Copyright (c) 2000, 2015, Oracle and/or its affiliates.All rights reserved.

Oracle is a registered trademark of Oracle Corporationand/or its

affiliates. Other names may be trademarks of theirrespective

owners.

Type 'help;' or '\h' for help. Type '\c' to clear thecurrent input statement.

mysql>

mysql错误总结,主要是安装目录的权限和my.cnf 默认的配置文件需要修改。

本文出自 “小菜鸟” 博客,,请务必保留此出处

你可以按照以下步骤安装配置 MySQL 5.5.6: 1. 下载MySQL 5.5.6安装文件:你可以在MySQL官方网站上下载适用于你的操作系统的安装文件。选择正确的版本(32位或64位)以及适当的操作系统。 2. 安装MySQL:双击安装文件,按照提示进行安装。在安装过程中,你可以选择自定义安装选项,以便选择安装目录和其他设置。 3. 配置MySQL安装完成后,进入MySQL安装目录,在该目录下找到my.ini或my.cnf文件(具体名称取决于你的操作系统),用文本编辑器打开它。 4. 修改配置文件:在配置文件中,你可以修改MySQL的各种配置选项。以下是一些常见的配置选项: - datadir:指定MySQL数据库文件的存储路径。 - port:指定MySQL服务器监听的端口号。 - character-set-server:指定MySQL服务器使用的字符集。 - max_connections:指定允许的最大连接数。 - innodb_buffer_pool_size:指定InnoDB存储引擎使用的内存池大小。 根据你的需求,修改这些配置选项。保存并关闭配置文件。 5. 启动MySQL服务:根据你的操作系统,使用相应的命令启动MySQL服务。例如,在Windows上,你可以在命令提示符下运行`net start mysql`命令。在Linux上,你可以运行`service mysql start`命令。 6. 测试连接:打开MySQL的命令行客户端,并使用root用户登录。如果成功登录,表示MySQL安装配置成功了。 这些是安装配置MySQL 5.5.6的基本步骤。请注意,在实际操作中可能会有一些差异,具体取决于你的操作系统和个人需求。建议查阅MySQL官方文档或其他可靠资源,以获取更详细和准确的安装配置信息。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值