日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mysql企业版 5.6.18 安装_Mysql 5.6.18解压包版在Rhel6.7上安装

發布時間:2025/4/5 数据库 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql企业版 5.6.18 安装_Mysql 5.6.18解压包版在Rhel6.7上安装 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Mysql的安裝方式有三種:RPM包、二進程包和源碼包。RPM二進制源碼

優點安裝簡單,適合初學者學習使用安裝簡單;可以安裝到任何路徑下,靈活性好;一臺服務器可以安裝多個MySQL在實際安裝的操作系統進行可根據需要定制編譯,最靈活;性能最好;一臺服務器可以安裝多個MySQL

缺點需要單獨下載客戶端和服務器;安裝路徑不靈活,默認路徑不能修改,一臺服務器只能安裝一個MySQL已經經過編譯,性能不如源碼編譯得好;不能靈活定制編譯參數安裝過程較復雜;編譯時間長

文件布局/usr/bin(客戶端程序和腳本)

/usr/sbin(mysqld服務器)/var/lib/mysql(日志文件和數據庫)/usr/share/doc/packages(文檔)

/usr/include/mysql(包含(頭)文件)

/usr/lib/mysql(庫文件)/usr/share/mysql(錯誤消息和字符集文件)/usr/share/sql-bench(基準程序)bin(客戶端程序和mysqld服務器)

data(日志文件和數據庫)docs(文檔和ChangeLog)include(包含(頭)文件)lib(庫文件)

scripts(mysql_install_db腳本,用來安裝系統數據庫)

share/mysql(錯誤消息文件)

sql-bench(基準程序)bin(客戶端程序和腳本)include/mysql(包含(頭)文件)

info(Info格式的文檔)lib/mysql(庫文件)

libexec(mysqld服務器)、share/mysql(錯誤消息文件)

sql-bench(基準程序和crash-me測試)

var(數據庫和日志文件)

摘自深入淺出MySQL

1、配置環境和創建用戶[root@rhel6?~]#?mkdir?/opt/mysql

[root@rhel6?~]#?mkdir?/mysqldata

[root@rhel6?~]#?groupadd?mysql

[root@rhel6?~]#?useradd?-r?-g?mysql?-s?/bin/flase?mysql

[root@rhel6?~]#?chown?mysql:mysql?/opt/mysql

[root@rhel6?~]#?chown?mysql:mysql?/mysqldata

--關閉selinux

[root@rhel6?~]#?vi?/etc/selinux/config

SELINUX=disabled

--配置環境變量

[root@rhel6?scripts]#?vi?~/.bash_profile

--添加下面兩條

export?MYSQL_PATH=/opt/mysql/mysql5.6.18

export?PATH=$PATH:$MYSQL_PATH/bin

[root@rhel6?scripts]#?source?~/.bash_profile

2、上傳并解壓安裝包[root@rhel6?~]#?cd?/opt/mysql/

[root@rhel6?mysql]#?ls

mysql-advanced-5.6.18-linux-glibc2.5-x86_64.tar.gz

[root@rhel6?mysql]#?tar?-zxvf?mysql-advanced-5.6.18-linux-glibc2.5-x86_64.tar.gz

mysql-advanced-5.6.18-linux-glibc2.5-x86_64/bin/mysql_convert_table_format

mysql-advanced-5.6.18-linux-glibc2.5-x86_64/bin/mysql_client_test

mysql-advanced-5.6.18-linux-glibc2.5-x86_64/bin/mysqlhotcopy

mysql-advanced-5.6.18-linux-glibc2.5-x86_64/bin/mysqladmin

mysql-advanced-5.6.18-linux-glibc2.5-x86_64/bin/msql2mysql

......

[root@rhel6?mysql]#?mv?mysql-advanced-5.6.18-linux-glibc2.5-x86_64?mysql5.6.18

[root@rhel6?mysql]#?ll

total?306412

drwxr-xr-x?13?root?root??????4096?Nov?13?20:38?mysql5.6.18

-rw-r--r--??1?root?root?313754429?Nov?13?20:37?mysql-advanced-5.6.18-linux-glibc2.5-x86_64.tar.gz

[root@rhel6?mysql]#?chown?-R?mysql:mysql?mysql5.6.18/

[root@rhel6?mysql]#?ll

total?306412

drwxr-xr-x?13?mysql?mysql??????4096?Nov?13?20:38?mysql5.6.18

-rw-r--r--??1?root??root??313754429?Nov?13?20:37?mysql-advanced-5.6.18-linux-glibc2.5-x86_64.tar.gz

3、安裝mysql[root@rhel6?mysql]#?cd?/opt/mysql/mysql5.6.18/support-files/

[root@rhel6?support-files]#?ls

binary-configure??magic??my-default.cnf??mysqld_multi.server??mysql-log-rotate??mysql.server??solaris

[root@rhel6?support-files]#?cd?/opt/mysql/mysql5.6.18/scripts/

[root@rhel6?scripts]#?ls

mysql_install_db

[root@rhel6?scripts]#?./mysql_install_db?--user=mysql?--basedir=/opt/mysql/mysql5.6.18?--datadir=/mysqldata

WARNING:?The?host?'rhel6'?could?not?be?looked?up?with?/opt/mysql/mysql5.6.18/bin/resolveip.

This?probably?means?that?your?libc?libraries?are?not?100?%?compatible

with?this?binary?MySQL?version.?The?MySQL?daemon,?mysqld,?should?work

normally?with?the?exception?that?host?name?resolving?will?not?work.

This?means?that?you?should?use?IP?addresses?instead?of?hostnames

when?specifying?MySQL?privileges?!

Installing?MySQL?system?tables...2016-11-13?20:42:18?0?[Warning]?TIMESTAMP?with?implicit?DEFAULT?value?is?deprecated.?Please?use?--explicit_defaults_for_timestamp?server?option?(see?documentation?for?more?details).2016-11-13?20:42:18?1421?[Note]?InnoDB:?Using?atomics?to?ref?count?buffer?pool?pages

......

OK

Filling?help?tables...2016-11-13?20:42:21?0?[Warning]?TIMESTAMP?with?implicit?DEFAULT?value?is?deprecated.?Please?use?--explicit_defaults_for_timestamp?server?option?(see?documentation?for?more?details).

......

OK

To?start?mysqld?at?boot?time?you?have?to?copy

support-files/mysql.server?to?the?right?place?for?your?system

PLEASE?REMEMBER?TO?SET?A?PASSWORD?FOR?THE?MySQL?root?USER?!

To?do?so,?start?the?server,?then?issue?the?following?commands:

/opt/mysql/mysql5.6.18/bin/mysqladmin?-u?root?password?'new-password'

/opt/mysql/mysql5.6.18/bin/mysqladmin?-u?root?-h?rhel6?password?'new-password'

Alternatively?you?can?run:

/opt/mysql/mysql5.6.18/bin/mysql_secure_installation

which?will?also?give?you?the?option?of?removing?the?test

databases?and?anonymous?user?created?by?default.??This?is

strongly?recommended?for?production?servers.

See?the?manual?for?more?instructions.

You?can?start?the?MySQL?daemon?with:

cd?.?;?/opt/mysql/mysql5.6.18/bin/mysqld_safe?&

You?can?test?the?MySQL?daemon?with?mysql-test-run.pl

cd?mysql-test?;?perl?mysql-test-run.pl

Please?report?any?problems?at?http://bugs.mysql.com/

The?latest?information?about?MySQL?is?available?on?the?web?at

http://www.mysql.com

Support?MySQL?by?buying?support/licenses?at?http://shop.mysql.com

New?default?config?file?was?created?as?/opt/mysql/mysql5.6.18/my.cnf?and

will?be?used?by?default?by?the?server?when?you?start?it.

You?may?edit?this?file?to?change?server?settings

WARNING:?Default?config?file?/etc/my.cnf?exists?on?the?system

This?file?will?be?read?by?default?by?the?MySQL?server

If?you?do?not?want?to?use?this,?either?remove?it,?or?use?the

--defaults-file?argument?to?mysqld_safe?when?starting?the?server

可以看到安裝完成后mysql會給出一些提示、建議。

4、復制相關文件[root@rhel6?scripts]#?cp?/opt/mysql/mysql5.6.18/support-files/mysql.server?/etc/init.d/mysqld

[root@rhel6?scripts]#?cp?/opt/mysql/mysql5.6.18/support-files/my-default.cnf?/etc/my.cnf

cp:?overwrite?`/etc/my.cnf'??yes

注意不要使用系統自帶的/etc/my.cnf文件,否則啟動mysql服務時會報錯。

Starting MySql.. ERROR! The server quit without updating PID file(/var/mysql/data/rhel6.pid).

5、修改參數[root@rhel6?scripts]#?vi?/etc/init.d/mysqld

##修改下面兩個參數如下

basedir=/opt/mysql/mysql5.6.18

datadir=/mysqldata

6、加入開機啟動[root@rhel6?scripts]#?chkconfig?--levels?235?mysqld?on

[root@rhel6?scripts]#?chkconfig?--list?mysqld

mysqld?????????0:off1:off2:on3:on4:on5:on6:off

7、啟動mysql服務[root@rhel6?scripts]#?service?mysqld?start

Starting?MySQL.?SUCCESS!

8、連接mysql[root@rhel6?scripts]#?mysql?-uroot

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

Your?MySQL?connection?id?is?1

Server?version:?5.6.18-enterprise-commercial-advanced?MySQL?Enterprise?Server?-?Advanced?Edition?(Commercial)

Copyright?(c)?2000,?2014,?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)

9、mysql的幫助1.用“?contents”命令來顯示所有可供查詢的的分類

mysql>???contents

You?asked?for?help?about?help?category:?"Contents"

For?more?information,?type?'help?',?where??is?one?of?the?following

categories:

Account?Management

Administration

Compound?Statements

Data?Definition

Data?Manipulation

Data?Types

Functions

Functions?and?Modifiers?for?Use?with?GROUP?BY

Geographic?Features

Help?Metadata

Language?Structure

Plugins

Procedures

Storage?Engines

Table?Maintenance

Transactions

User-Defined?Functions

Utility

mysql>?help?data?types

You?asked?for?help?about?help?category:?"Data?Types"

For?more?information,?type?'help?',?where??is?one?of?the?following

topics:

AUTO_INCREMENT

BIGINT

BINARY

BIT

BLOB

BLOB?DATA?TYPE

BOOLEAN

CHAR

CHAR?BYTE

DATE

DATETIME

DEC

DECIMAL

DOUBLE

DOUBLE?PRECISION

ENUM

FLOAT

INT

INTEGER

LONGBLOB

LONGTEXT

MEDIUMBLOB

MEDIUMINT

MEDIUMTEXT

SET?DATA?TYPE

SMALLINT

TEXT

TIME

TIMESTAMP

TINYBLOB

TINYINT

TINYTEXT

VARBINARY

VARCHAR

YEAR?DATA?TYPE

mysql>?help?int

Name:?'INT'

Description:

INT[(M)]?[UNSIGNED]?[ZEROFILL]

A?normal-size?integer.?The?signed?range?is?-2147483648?to?2147483647.

The?unsigned?range?is?0?to?4294967295.

URL:?http://dev.mysql.com/doc/refman/5.6/en/numeric-type-overview.html

總結

以上是生活随笔為你收集整理的mysql企业版 5.6.18 安装_Mysql 5.6.18解压包版在Rhel6.7上安装的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。