1. 程式人生 > >centos 6.5安裝MySQL 5.6.35

centos 6.5安裝MySQL 5.6.35

linux mysql

  • 下載軟件

[[email protected] src]# wget -q http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz
  • 解壓

[[email protected] /]# yum -y install gcc gcc-c++ zlib-devel libtool ncurses-devel libxml2-devel cmake
[[email protected] /]# useradd -s /sbin/nologin -M mysql
[[email protected]
/* */ /]# mkdir -p /usr/local/mysql [[email protected] /]# mkdir -p /usr/local/mysql/data/mysql [[email protected] /]# cd /usr/local/src/ [[email protected] src]# pwd /usr/local/src [[email protected] src]# ls mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz [[email protected] src]# tar xf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz [[email protected]
/* */ src]# cd mysql-5.6.35
  • 編譯、安裝

[[email protected] mysql-5.6.32]# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DMYSQL_USER=mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
[[email protected]
/* */ mysql-5.6.32]# make [[email protected] mysql-5.6.32]# make install [[email protected] mysql-5.6.32]# echo $? 0 [[email protected] mysql-5.6.32]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld [[email protected] mysql-5.6.32]# chmod +x /etc/init.d/mysqld [[email protected] mysql-5.6.32]# chown -R mysql:mysql /usr/local/mysql/data/mysql [[email protected] mysql-5.6.32]# chown -R mysql:mysql /usr/local/mysql/
[[email protected] mysql-5.6.32]# cd /usr/local/mysql/scripts/
[[email protected] scripts]# pwd/usr/local/mysql/scripts
[[email protected] scripts]# ./mysql_install_db  --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data/mysql
[[email protected] scripts]#  cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf
cp: overwrite `/etc/my.cnf‘? y
[[email protected] scripts]# vim /etc/my.cnf 
# port = .....
# server_id = .....
# socket = .....

datadir = /usr/local/mysql/data/mysql
port = 3306
server_id = 2
socket = /usr/local/mysql/mysql.sock

# 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
lower_case_table_names = 1
wait_timeout=3600
log_bin_trust_function_creators=1
max_connections=500
[[email protected] scripts]# vim /etc/profile
export PATH=$PATH:/usr/local/mysql/bin
[[email protected] scripts]# source /etc/profile
[[email protected] scripts]# /etc/init.d/mysqld start
Starting MySQL. SUCCESS! 
[[email protected] scripts]# netstat -nlpt | grep mysql
tcp        0      0 :::3306                     :::*                        LISTEN      16434/mysqld  
[[email protected] mysql]# ls
bin  COPYING  data  docs  include  lib  man  my.cnf  mysql.sock  mysql-test  README  scripts  share  sql-bench  support-files
[[email protected] scripts]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1Server version: 5.6.32 Source distribution

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

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql> show databases;+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+4 rows in set (0.00 sec)

mysql> exit
Bye
[[email protected] scripts]# mysqladmin -uroot password "123456"
Warning: Using a password on the command line interface can be insecure.
[[email protected] scripts]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10Server version: 5.6.32 Source distribution

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

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql> 
mysql> 
mysql> exit
Bye
[[email protected] scripts]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12Server version: 5.6.32 Source distribution

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

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql> CREATE USER [email protected]%‘ IDENTIFIED BY ‘123456‘;
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL ON *.* TO [email protected]%‘;
Query OK, 0 rows affected (0.00 sec)

mysql>


本文出自 “十裏春風” 博客,請務必保留此出處http://visitor.blog.51cto.com/11247238/1956358

centos 6.5安裝MySQL 5.6.35

相關推薦

centos 6.5安裝MySQL 5.6.35

linux mysql下載軟件[[email protected]/* */ src]# wget -q http://mirrors.sohu.com/mysql/MySQL-5.6/mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz解壓[[email 

centos 6.5 安裝mysql 5.7.21 community

connect edi 主機 查看 restart 特殊 generated src req Step1: 檢測系統是否自帶安裝mysql # yum list installed | grep mysql Step2: 刪除系統自帶的mysql及其依賴命令: # yum

CentOS 7.5 安裝 MySQL 5.6 並配置環境變數

概述: 通過原始碼安裝高版本的5.6.14。   正文: 一:解除安裝舊版本 使用下面的命令檢查是否安裝有MySQL Server rpm -qa | grep mysql 有的話通過下面的命令來解除安裝掉 目前我們查詢到的是這樣的: [[email

centos 7 簡單安裝mysql 5.6 教程

 1.解除安裝系統自帶的Mariadb  查詢命令:rpm -qa|grep mariadb 解除安裝命令:rpm -e --nodeps mariadb-libs-5.5.44-2.el7.centos.x86_64 2. 檢視官方文件 一條語句就能簡單安裝

Centos 6.5安裝mysql 5.5

#列出安裝的mysql  rpm -qa | grep mysql #centos6.5 basic server 版本 預設安裝了mysql5.1,所以先解除安裝mysql5 yum -y remove mysql-libs-5.1*   1.安裝

CentOS 7.x安裝MySQL 5.6的詳細步驟、基本配置及相關說明

MySQL安裝包內自帶了一個安裝指令碼,此處以mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz為例。 這裡使用的作業系統為CentOS-7-x86_64-Minimal-1810,執行前需要安裝依賴: yum install perl autoco

CentOS 6.9安裝MySQL 5.6 (使用yum安裝

移除CentOS預設的mysql-libs [[email protected]test01 srv]# whereis mysql mysql: /usr/lib64/mysql /usr/share/mysql [[email protected]t

centOS 6.5 安裝 mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz

下載地址: https://dev.mysql.com/downloads/mysql/5.7.html#downloads #解除安裝系統自帶的Mariadb [[email protected] local]# rpm -qa|grep mariadb

centos 6.6 yum安裝mysql 5.7.16

先到 yum 安裝庫 http://repo.mysql.com/  查詢需要的mysql yum 包 這裡用mysql57-community-release-el6-8.noarch   安裝5.

虛擬機器下CentOS 6.x安裝MySQL 5.6.x

linux系統:CentOS6.9-i386 mysql版本:MySQL-5.6.22-1.el6.i686.rpm-bundle.tar 保持聯網 PS:mysql作者從甲骨文公司離職,甲骨文有將mysql閉源的打算,所以CentOS 7系列預設不再支援

cent os 6.5 安裝 mysql 5.5出現warning

執行 rpm -ivh MySQL-server-5.5.62-1.el6.x86_64.rpm 命令後出現  warning: MySQL-server-5.5.62-1.el6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5

centos 7.3 安裝 mysql-5.7.18-linux-glibc2.5-x86_64

centos 7.3 安裝 mysql5.7 下載地址 :https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-linux-glibc2.5-x86_64.tar.gz 大概有600M 可以選擇迅雷下載然後進行上傳 ,因為是內網

CentOS 1804 中 安裝 MySQL 5.7.20 (或任意MySQL版本)

相關連結: 在 CentOS 1804 中 使用 yum 安裝 MySQL 5.7 最新版 在 CentOS 1804 中 安裝 MySQL 5.7.20 (或任意MySQL版本) 在 CentOS 1804 中 修改 MySQL 密碼策略 在 CentOS 中 開啟 MySQL 的

centos 7.3 安裝 mysql-5.7.22-linux-glibc2.5-x86_64

1、下載: [[email protected] ~]#  wget  https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.22-linux-glibc2.5-x86_64.tar.gz 

Centos 7 下安裝MySQL 5.7(yum方式)

       相信對於第一次接觸Linux系統下安裝MySQL的朋友來說,這個真的很麻煩。        我是試過用tar.gz的方式安裝,按照別人的教程 總是會出現很多輸入完指令報錯的情況。所以一個步驟一個錯誤

Linux(Centos)伺服器安裝MySQL 5.7

Linux(Centos)伺服器安裝MySQL 5.7 MySQL的安裝方式有多種,但個人覺得這種方式比較簡單。前提你的Linux可以上外網。 // 檢查系統是否裝有mysql yum list installed | grep mysql // 刪除mysql及其依賴 yum -y remove

CentOS 7 二進位制安裝MySQL 5.7

CentOS 7 二進位制安裝MySQL 5.7 檢查是否安裝過mysql或者maridb 如果有 請解除安裝。 rpm -qa |grep mysql yum remove mysql* rpm -qa |grep mariadb yum remove maria

CentOS 7 編譯安裝mysql 5.7

終於把最後幾臺伺服器全部都從centos6 全部都升級到了centos7,雖說有不少運維指令碼得重寫,總體來說是值得得。 之前伺服器上部署得都是mysql5.5,今天也準備升級到5.7。 編譯mysql比較花費時間,也可以靜下心來寫寫部落格了。 安

centos 7 中安裝 mysql 5.7

lin lte wall 默認安裝 repo host emctl init 修改 centos 7 中安裝 mysql 5.7 環境說明: 查看centos的版本:cat /etc/redhat-release 安裝和配置步驟: 下載 mysql 源安裝包: sudo

Centos7.5 安裝 mysql 5.7 ( 解除安裝自帶 MariaDB)(實測)

ps原作者的話介紹下背景:CentOS 7 版本將MySQL資料庫軟體從預設的程式列表中移除,用MariaDB代替了,MariaDB資料庫管理系統是MySQL的一個分支,主要由開源社群在維護,採用GPL授權許可。開發這個分支的原因之一是:甲骨文公司收購了MySQL後,有將MySQL閉源的潛在風險,因