Linux下通過二進位制原始碼安裝Mysql5.7(5.7安裝和命令與之前版本不同)
一、準備工作:
二、踏坑總結:
2.1關於初始化:
mysql5.7和之前版本不同,很多資料上都是這個命令:../scripts/mysql_install_db –user=mysql,而mysql5.7的mysql_install_db命令是在bin目錄下 的並且建議 用 mysqld –initialize命令
5.7之後用過使用
bin/mysqld --initialize --user=mysql --basedir=/Ultrapower/test/mysql --datadir=/Ultrapower/test/mysql/data
2.2關於配置檔案:
好多資料都有這樣一段
cp support-files/my-default.cnf /etc/my.cnf
就是把mysql/support-files/my-default.cnf下的配置檔案複製到/etc/my.cnf ,但是5.7之後是沒有my-default.cnf配置檔案的,這個不影響。
正常安裝之後, /etc/my.cnf應該存在,可以不用管上面複製那一步。下面是我用的配置檔案,可以參照使用。
# 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]
# 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
general_log_file = /var/log/mysql/mysql.log
general_log = 1
# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....
#kip-external-locking
skip-name-resolve
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
pid-file=/usr/local/mysql/data/mysql.pid
port=3306
character_set_server=utf8
init_connect='SET NAMES utf8'
log-error=/usr/local/mysql/data/mysqld.err
slow_query_log = 1
slow_query_log_file =/usr/local/mysql/data/slow-query.log
long_query_time = 1
log-queries-not-using-indexes
max_connections = 1024
back_log = 128
wait_timeout = 100
interactive_timeout = 200
key_buffer_size=256M
query_cache_size = 256M
query_cache_type=1
query_cache_limit=50M
max_connect_errors=20
sort_buffer_size = 2M
max_allowed_packet=16M
join_buffer_size=2M
thread_cache_size=200
innodb_buffer_pool_size = 2048M
innodb_flush_log_at_trx_commit = 1
innodb_log_buffer_size=32M
innodb_log_file_size=128M
innodb_log_files_in_group=3
server_id=1
log-bin=mysql-bin
binlog_cache_size=2M
max_binlog_cache_size=8M
max_binlog_size=512M
expire_logs_days=7
read_buffer_size=1M
read_rnd_buffer_size=16M
bulk_insert_buffer_size=64M
# 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.
# jo
2.3關於啟動:用命令systemctl start mysql.service報錯
[csy@root@instance-m4tjyg0q ~]# systemctl start mysql.service
Error getting authority: Error initializing authority: Error calling StartServiceByName
for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Could not watch jobs: Connection timed out
[csy@root@instance-m4tjyg0q ~]#
正確啟動方式是
#/etc/init.d/mysql start 或者 serivce mysql start 或者 bin/mysqld_safe&
2.4關於客戶端遠端連接出現許可權問題:
因為建立使用者的時候host 是 localhost所以其它外部ip無訪問,需要授權
GRANT ALL PRIVILEGES ON *.* TO '使用者名稱'@'%' IDENTIFIED BY '密碼' WITH GRANT OPTION;
%是任意ip
其它使用問題遇到再百度解決吧~
相關推薦
Linux下通過二進位制原始碼安裝Mysql5.7(5.7安裝和命令與之前版本不同)
一、準備工作: 二、踏坑總結: 2.1關於初始化: mysql5.7和之前版本不同,很多資料上都是這個命令:../scripts/mysql_install_db –user=mysql,而mysql5.7的mysql_install_db
Linux下以二進位制原始碼方式安裝mysql-5.7.24 資料庫
Linux下安裝mysql資料庫 今天正好有時間自己在環境下安裝資料庫,操作了一下,以供大家學習下,但是也有一寫坑的地方 下載安裝包 mysql官網下載地址 1、如果需要下載到本地的話,點選下載mysql-5.7.24至本地 2、如果是在linux伺服器上操作
Linux下通過shell獲取網絡卡的ip地址和mac地址
ip=`ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'` mac=`ifconfig | grep HWaddr | awk -F" " '{print $5}'` 轉自:http://blog.csdn.
LINUX下通過外部SMTP發郵件 (直接拋棄sendmail和postfix)
至於sentmail和postfix的配置有多麼麻煩老衲在這裡就不多廢話了...反正老衲是配置了N個小時,最終弄的頭暈眼花也沒弄好... 下面的方法可以讓你完全擺脫這兩個工具...當然,你要是想做郵件伺服器的話就令當別論了...你要是隻想讓伺服器自動發個郵件什麼的,用下面
linux下通過yum倉庫安裝mysql
linux mysql 倉庫 環境:Centos6.5查看centos版本:[[email protected]/* */ ~]# cat /etc/redhat-release CentOS release 6.5 (Final)1.查看是否安裝了mysql[[email
Linux下通過源碼編譯安裝程序
安裝程序 configure 系統目錄 install 命令 com 需要 figure .com ASK: Linux下通過源碼編譯安裝程序(configure/make/make install的作用) configure Linux 平臺有各種不同的配置,安裝時需
linux下通過phpize為php在不重新編譯php情況下安裝模塊memcache
memcache with tps emca 添加 pecl inux usr ron 通過phpize為php在不重新編譯php情況下安裝模塊memcache 1. 下載 wget http://pecl.php.net/get/memcache-2.2.4.tgz
linux下通過yum安裝svn及配置
1.環境 centos6.4 2.安裝svn yum -y install subversion 3.配置 建立版本庫目錄 mkdir /www/svndata svnserve -d -r /www/svndata 4.建立版本庫 建立一個新的Subversio
Linux下mysql的原始碼編譯安裝
1>【安裝依賴包】 yum -y install make gcc-c++ cmake bison-devel ncurses-devel bison perl perl-devel perl perl-devel 2>【解壓mys
CentOS7下安裝mysql免安裝版(mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz)
1.從mysql官網下載二進位制安裝包(https://dev.mysql.com/downloads/mysql/) 2.檢查是否已經安裝了mysql或者是MariaDB,如果已經安裝,則先把安裝的解除安裝 [[email protected] software]#
Linux系統指定目錄下安裝配置Mysql 5.7.15步驟圖文詳解,只需5分鐘搞定
mysql安裝有兩種:原始碼自編譯安裝和編譯過的二進位制檔案進行安裝。後一種方法相比原始碼安裝,節省了半個小時的編譯時間,只需要合理配置即可。至於其他的優劣,歡迎大家討論。網上有很多教程,但是對於想要把mysql安裝到指定路徑的博文卻很少,而且還有很多漏洞。為了
linux下安裝mysql(5.7版本)
阿里雲上面,安靜環境安裝mysql資料庫,指定安裝目錄、指定資料檔案 目錄 linux系統版本: CentOS Linux release 7.4 64位 安裝原始檔版本:mysql-5.7.21-linux-glibc2.12-x86_64.tar.gz mysql安裝路徑:/ap
Linux下通過RPM如何安裝和解除安裝軟體?
在 Linux 作業系統下,幾乎所有的軟體均通過RPM 進行安裝、解除安裝及管理等操作。RPM 的全稱為Redhat Package Manager(紅帽子包管理器) ,是由Redhat 公司提出的,用於管理Linux 下軟體包的軟體。Linux 安裝時,除了幾個核心模組以外
010 Linux 下通過yum、apt、dnf方式安裝和配置Nginx伺服器
一、安裝 Centos系統 1、安裝Nginx源。 Centos7下:#rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
Linux CentOS7原始碼安裝配置mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz
一 解除安裝預裝資料庫MariaDB是由MySQL的原始開發人員建立的MySQL的流行分支。 源於與Oracle收購MySQL有關的問題。 支援小資料處理任務和企業需求。 旨在成為MySQL的替代。相容mysql命令,更新比mysql要快,效能要好。但是這裡要介紹的是mys
Linux下通過find命令進行rm文件刪除的小技巧
ase test sysconfig ger sdn tun 執行過程 fun alt 我們常常會通過find命令進行批量操作。如:批量刪除舊文件、批量改動、基於時間的文件統計、基於文件大小的文件統計等。在這些操作其中,因為rm刪除操作會導致文件夾結構變化,
Linux下通過vconfig配置vlan
strong str 都是 指定 ssa 註冊 chkconfig init add 初衷: 我在centos上面搭建了一個dhcp server,由於client發來的dhcp request是加了tag的,為了使dhcp server能夠正常response分給clie
linux下通過軟連接實現訪問項目路徑外面的資源
技術 虛擬目錄 color 相關 上傳文件 eclipse 擔心 成功 tail 在javaweb項目開發中,圖片上傳是個比較常見的場景。一般都是在項目路徑下建個文件夾,然後上傳到該文件夾下;這樣這個圖片就可以和靜態資源一樣被直接訪問。這樣的好處就是訪問這圖
Linux下通過rdesktop遠程windows主機
rdesktopLinux下使用rdesktop命令,可完美遠程windows主機。實驗環境如下:OS版本:elementaryos-0.4.1-stable.20170814-x64本機環境:物理機一般有的Linux發行版的軟件中心,都會有Remmina遠程工具,比如國產deepin OS,使用起來也很方便
Linux下如何查看一個下載的包被安裝在什麽位置
說明 安裝 apach 數據 所在 版本 4.2 ash 強制 Linux下如何查看一個下載的包被安裝在什麽位置 指令 ps -ef|grep mysql 得出結果 root 17659 1 0 2011 ? 00:00:00