mysql 5.5 linux 安装

# 启动 mysql (指定 默认 的 配置文件)
./mysqld --defaults-file=my.cnf

# 后台 启动 mysql
./mysqld --defaults-file=my.cnf &

/lyc/mysql-5.5.62/tmp/mysql.sock

 注意 ; 如果没有 mysql 用户,可能需要新建mysql 用户!!!https://www.cnblogs.com/whm-blog/p/11224061.html

# 安装 一定要指定 basedir 和 datadir !

./mysql_install_db --basedir=/lyc/mysql-5.5.62 --datadir=/lyc/mysql-5.5.62/mysql-data

 # 客户端 连接 mysql 

/lya/software/mysql-5.5.62/bin/mysql -S /lya/software/mysql-5.5.62/tmp/mysql.sock -P 3306

一份配置 如下- (详情参考 https://dev.mysql.com/doc/refman/5.5/en/)

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.



[mysqld]
port=3307
socket = /lyc/mysql-5.5.62/tmp/mysql.sock  # socket 名称,如果一个服务器有多个 mysql 请务必指定此值
max_allowed_packet=2G  # 最大文件导入限制 防止 导入数据过大时出错
wait_timeout=2880000   # 防止 导入数据过大时出错 
interactive_timeout = 2880000   # 防止 导入数据过大时出错
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....

basedir=/lyc/mysql-5.5.62  # mysql 目录
datadir=/lyc/mysql-5.5.62/mysql-data  # mysql 数据目录

character-set-server=utf8  # 编码
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 
user=root
[client]
default-character-set=utf8
port = 3307
socket = /lyc/mysql-5.5.62/tmp/mysql.sock  # 同上

[mysql]
default-character-set=utf8

 

posted on 2019-07-18 10:42  正义的伙伴!  阅读(480)  评论(0编辑  收藏  举报

导航

//增加一段JS脚本,为目录生成使用