mac 搭建lnmp環境
檢視埠號
登入進入mysql以後,執行
show global variables like 'port';
終端提示
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.01 sec)
可以看到mysql5.7.1的預設埠是3306。
五、建立my.cnf配置檔案1.首先需要知道系統是按如下順序去找my.cnf:
i. /etc/my.cnf
ii. /etc/mysql/my.cnf
iii. /usr/local/etc/my.cnf
iv. ~/.my.cnf
2.所以就在/etc下建立my.cnf
$ cd /etc
$ sudo vim my.cnf
配置檔案內容如下:
# Example MySQL config file for medium systems.#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
default-character-set=utf8
#password = your_password
port = 3306
socket = /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
character-set-server=utf8
init_connect='SET NAMES utf8
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 16M
max_allowed_packet = 1M
table_open_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M
character-set-server=utf8
secure_file_priv=''
init_connect='SET NAMES utf8'
# 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
# binary logging format - mixed recommended
binlog_format=mixed
# 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
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin=mysql-bin
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /usr/local/mysql/data
#innodb_data_file_path = ibdata1: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 = 16M
#innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 5M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
default-character-set=utf8
[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
相關推薦
mac 搭建lnmp環境
檢視埠號登入進入mysql以後,執行show global variables like 'port';終端提示 +---------------+-------+ | Variable_name | Value | +---------------+-------+ | port | 3306 |
Mac之lnmp環境搭建
之前在Windows上開發大部分都是使用的整合環境(xampp,phpstudy,wamp),可以完成日常便捷開發,有些時候卻Windows下無法實現的就需要自己搭建虛擬機器,在虛擬機器中搭建lnmp環境,也可以完成開發工作。同樣在Mac也會有這兩種選擇,可以使用現成的整合開發環境(mamp),但是使用M
基於MAC的 LNMP環境搭建, PHP5.6,PHP7.2.3 雜記
sudo ./configure --prefix=/Users/heweijun/www/server/php --with-config-file-path=/Users/heweijun/www/server/php/etc --enable-fpm --with-fpm-user=www --wit
MAC使用php7搭建LNMP環境
1、安裝MySQL: 檢視MySQL可用版本資訊: brew info mysql 我這邊看到的版本是5.7.10: mysql: stable 5.7.10 (bottled) 接下來安裝MySQL5.7.10: brew instal
centos7.2 搭建lnmp環境(轉)
現在 working arc emctl 加密解密 容易 restart lis 三方 一.nginx安裝 1.下載對應當前系統版本的nginx包(package) ? wget http://nginx.org/packages/centos/7/noarch/RPMS/
centos6.5下使用yum完美搭建LNMP環境(php5.6)
準備工作 ase write res .so -c service 啟動 tcp 準備工作 配置防火墻,開啟80端口、3306端口刪除原有的 iptables , 添加合適的配置 rm -rf /etc/sysconfig/iptables vi /etc/sysco
linux環境搭建lnmp環境
數據庫 pass () mat ttext test ica ket stat 編譯安裝lnmp環境準備軟件:nginx1.10.3+php-5.5.12+mariadb10.0.8(數據庫在此使用的yum安裝)如果需要編譯安裝的可以給我留言,我後續再發布出來! 依賴包均已
高效搭建lnmp環境
頁面 mysq onf cli http div hosts leg lec 1:安裝nginx sudo apt-get install nginx 檢測 nginx : sudo nginx -t 出現如下表示成功 2:安裝
使用編譯搭建LNMP環境
軟連接 指定位置 lease fin 編譯安裝 .html 地址 完成 sql mysql LNMP=Linux+Nginx+MySQL+php 所以搭建LNMP需要逐一安裝這幾個包 下面我們就逐一安裝各種包 安裝環境centos6.8_64 一、安裝Nginx1.10.3
騰訊雲CentOS6.8搭建lnmp環境
lnmp環境 系統 pan 技術分享 pcre nmp ima style ges 一、安裝Ngnix 首先查看服務器系統的環境 可以看出我的系統環境是(CentOS6.9 64位) 2. 安裝pcre和
centos6.5下使用yum完美搭建LNMP環境(php5.6,mysql5.1,nginx1.10)
table 保存 rest var 虛擬 安裝包 允許 三方 www 準備工作 配置防火墻,開啟80端口、3306端口 不用執行這句:rm -rf /etc/sysconfig/iptables 直接進入修改:vi /etc/sysconfig/iptables 添加8
一鍵搭建LNMP環境
LNMP linux系統服務 #!/bin/bash #This Shell Is To Install LNMP language(){ #判斷環境語言 echo $LANG |grep -q zh if [ $? -eq 0 ];then
騰訊雲Centos7.3搭建LNMP環境的一次記錄
大小 ins 操作 技術 style repos release val 鏡像 1.修改系統鏡像源 為了使安裝速度更快,在這裏我選擇網易鏡像源:http://mirrors.163.com/.help/centos.html 參考上述網址說明 首先備份/etc/yum.re
搭建LNMP環境
沒有 信息 這樣的 div 執行 ews 依賴 語言 版本 安裝所需環境 Nginx 是 C語言 開發,建議在 Linux 上運行,當然,也可以安裝 Windows 版本,本篇則使用 CentOS 7 作為安裝環境。 一. gcc 安裝安裝 nginx 需要先將官網下載的源
CentOS搭建LNMP環境
config mysql har html lnmp host div () 查看 ========== 安裝nginx ========== 查看nginx信息:yum info nginx 安裝nginx:yum -y install nginx 查看nginx是否存在
從零開始用剛買的阿裏雲實例搭建lnmp環境(非集成包)
window firewall GZip壓縮 正則表達式語法 表達式 http 開啟 lib .org 一、安裝前 1. 更新系統軟件: yum update 2. 查看是否已安裝wget: rpm -qa wget 否則安裝: yum install wget 3.
WIN10 vagrant和virtualbox虛擬機和一鍵搭建lnmp環境配置thinkphp虛擬主機
版本 瀏覽器 roo inf inter 偽靜態 軟件 生效 映射 版本:win10系統 virtualbox:5.1.26 vagrant :1.9.7 centos 7.0 xshell/git 首先下載好對應版本的軟件 配置vagrant和virtualb
docker下安裝centos,並在其上搭建lnmp環境
方便 libxml bic spro yum 啟動 openss ont dock 一、安裝CentOs容器 1.進入docker下載CentOs,這裏我使用的CentOs6.8 docker pull centos:6.8 2.創建容器 sudo docker r
mac搭建mnmp環境
with god netstat tap lin 保存 管理 debug grep brew安裝nginx brew install nginx 安裝php56 brew tap homebrew/dupes brew tap josegonzalez/homebrew-p
CentOS 6.9 yum方式搭建LNMP環境,並部署Discuz論壇
LNMP discuz 一、演示環境:IP安裝的程序包版本192.168.1.144nginx(epel源)1.10.2php5.3.3php-fpm(FastCGI進程管理器)php-mysql(php連接mysql時需要用到的驅動)192.168.1.145MySQL-server-5.6.39-