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

歡迎訪問 生活随笔!

生活随笔

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

数据库

centos7离线安装mysql_Red Hat6.4离线安装mysql安装手册

發布時間:2025/3/20 数据库 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 centos7离线安装mysql_Red Hat6.4离线安装mysql安装手册 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

注(/home/mysql/data/mysql/data)目錄結構

[root@localhost ]# cd /home

[[root@localhost home]# useradd mysql

(新建目錄data)

[[root@localhost home]#cd /data

[[root@localhost data]# echo 'mysql'|passwd --stdin mysql

更改用戶 mysql 的密碼 。

passwd: 所有的身份驗證令牌已經成功更新。

上傳包mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz(目錄/home/mysql/data/)

[root@Master data]# tar -zxvf mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz

mysql-5.6.42-linux-glibc2.12-x86_64/share/charsets/macce.xml

mysql-5.6.42-linux-glibc2.12-x86_64/share/charsets/Index.xml

mysql-5.6.42-linux-glibc2.12-x86_64/share/russian/errmsg.sys

mysql-5.6.42-linux-glibc2.12-x86_64/share/estonian/errmsg.sys

mysql-5.6.42-linux-glibc2.12-x86_64/share/hungarian/errmsg.sys

mysql-5.6.42-linux-glibc2.12-x86_64/share/polish/errmsg.sys

mysql-5.6.42-linux-glibc2.12-x86_64/share/romanian/errmsg.sys

mysql-5.6.42-linux-glibc2.12-x86_64/share/spanish/errmsg.sys

[root@localhost data]# ls

mysql-5.6.42-linux-glibc2.12-x86_64 mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz

[root@localhost data]# mv mysql-5.6.42-linux-glibc2.12-x86_64 mysql

[root@localhost data]# ls

mysql mysql-5.6.42-linux-glibc2.12-x86_64.tar.gz

[root@localhost data]# chown -R mysql:mysql mysql

[root@localhost data]# su mysql

[mysql@localhost data]$ cd mysql/scripts/

[mysql@localhost scripts]$ ls

mysql_install_db

[mysql@localhost scripts]$ ./mysql_install_db --user=mysql --basedir=/home/mysql/data/mysql --datadir=/home/mysql/data/mysql/data

Installing MySQL system tables...2018-11-28 11:42:58 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

.

.

.

2018-11-28 11:42:59 2933 [Note] InnoDB: Starting shutdown...

2018-11-28 11:43:00 2933 [Note] InnoDB: Shutdown completed; log sequence number 1625977

OK

Filling help tables...2018-11-28 11:43:00 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2018-11-28 11:43:00 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.

2018-11-28 11:43:00 0 [Note] /home/mysql/data/mysql/bin/mysqld (mysqld 5.6.42) starting as process 2955 ...

2018-11-28 11:43:00 2955 [Warning] Buffered warning: Changed limits: max_open_files: 1024 (requested 5000)

2018-11-28 11:43:00 2955 [Warning] Buffered warning: Changed limits: table_open_cache: 431 (requested 2000)

2018-11-28 11:43:02 2955 [Note] InnoDB: Shutdown completed; log sequence number 1625987

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:

/home/mysql/data/mysql/bin/mysqladmin -u root password 'new-password'

/home/mysql/data/mysql/bin/mysqladmin -u root -h localhost.localdomain password 'new-password'

Alternatively you can run:

/home/mysql/data/mysql/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 . ; /home/mysql/data/mysql/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 /home/mysql/data/mysql/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@localhost scripts]$ cd ../support-files/

[mysql@localhost support-files]$ cp my-default.cnf /etc/my.cnf

cp: cannot create regular file `/etc/my.cnf': Permission denied(提示沒權限)

[mysql@localhost support-files]$ ls

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

[mysql@localhost support-files]$ chmod 777 *

[mysql@localhost support-files]$ ls

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

[mysql@localhost support-files]$ cp my-default.cnf /etc/my.cnf

cp: cannot create regular file `/etc/my.cnf': Permission denied

[mysql@localhost support-files]$ su

Password:

[root@localhost support-files]# cp my-default.cnf /etc/my.cnf

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

[root@localhost support-files]# ls

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

[root@localhost support-files]# cp mysql.server /etc/init.d/mysql

[root@localhost support-files]# vim /etc/init.d/mysql

[root@localhost support-files]# vim /etc/profile

[root@localhost ~]# cd /usr/local/bin

[root@localhost bin]# chkconfig --add mysql

[root@localhost bin]# chkconfig mysql on

[root@localhost ~]# cd /home/mysql/data/mysql

[root@localhost mysql]# ls

bin COPYING data docs include lib man my.cnf mysql-test README scripts share sql-bench support-files

[root@localhost mysql]# cd support-files/

[root@localhost support-files]# ls

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

[root@localhost support-files]# service mysql start

Starting MySQL.Logging to '/home/mysql/data/mysql/data/localhost.localdomain.err'.

SUCCESS!

[root@localhost support-files]# chmod a+wrx /etc/init.d/mysql

[root@localhost support-files]# service mysql start

Starting MySQL SUCCESS!

[root@localhost ~]# cd /home/mysql/data/mysql/bin/

[root@localhost bin]# ./mysqladmin -u root password 'root'

Warning: Using a password on the command line interface can be insecure.

[root@localhost bin]# ./mysql -uroot -p

Enter password: root

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

Your MySQL connection id is 4

Server version: 5.6.42 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, 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> use mysql

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A

Database changed

mysql> select host,user from user;

+-----------------------+------+

| host | user |

+-----------------------+------+

| 127.0.0.1 | root |

| ::1 | root |

| localhost | |

| localhost | root |

| localhost.localdomain | |

| localhost.localdomain | root |

+-----------------------+------+

6 rows in set (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;

Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;

Query OK, 0 rows affected (0.01 sec)

mysql> select host,user from user;

+-----------------------+------+

| host | user |

+-----------------------+------+

| % | root |

| 127.0.0.1 | root |

| ::1 | root |

| localhost | |

| localhost | root |

| localhost.localdomain | |

| localhost.localdomain | root |

+-----------------------+------+

7 rows in set (0.00 sec)

mysql> exit

Bye

[root@localhost bin]# cd

[root@localhost ~]# vim /etc/init.d/mysql

[1]+ Stopped vim /etc/init.d/mysql

[root@localhost ~]# vi /etc/my.cnf

# For advice on how to change settings please see

# http://dev.mysql.com/doc/refman/5.6/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.

[client]

default-character-set=utf8

[mysqld]

lower_case_table_names=1

character-set-server=utf8

collation-server=utf8_general_ci

# 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 = .....

# 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

~

"/etc/my.cnf" 32L, 1151C

參考

# For advice on how to change settings please see

# http://dev.mysql.com/doc/refman/5.6/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.

[client]

default-character-set=utf8

[mysqld]

lower_case_table_names=1

character-set-server=utf8

collation-server=utf8_general_ci

# 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 = .....

# 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

總結

以上是生活随笔為你收集整理的centos7离线安装mysql_Red Hat6.4离线安装mysql安装手册的全部內容,希望文章能夠幫你解決所遇到的問題。

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

主站蜘蛛池模板: 超碰97在线资源站 | 久久久国产精品x99av | 四虎影院一区二区 | 国产男人的天堂 | 国产真实乱人偷精品人妻 | 国产成人a亚洲精品 | 在线aa | 日韩高清久久 | 超碰123| 吃瓜网今日吃瓜 热门大瓜 色婷在线 | 亚洲无套 | jzzjzz日本丰满少妇 | 欧美激情国产日韩精品一区18 | 欧美偷拍另类 | 精品欧美乱码久久久久久1区2区 | 美女光屁股视频 | 区一区二视频 | 欧美18—19性高清hd4k | 一女三黑人理论片在线 | gogo人体做爰大胆视频 | 色戒av| 国产日本精品视频 | 国产一级特黄 | 国产卡一卡二卡三无线乱码新区 | 亚洲在线第一页 | 超碰蜜桃 | 国产一级理论片 | 成人精品视频在线观看 | 亚洲国产精品一区二区久久hs | 狼人伊人久久 | 色婷婷欧美 | 午夜视频福利网站 | 男生插女生的网站 | 免费av在线网 | 91av视频在线观看 | 亚洲国产成人在线视频 | 欧美成人做爰大片免费看黄石 | 成人自拍网站 | 超碰神马 | 日韩午夜伦 | 国产伦精品一区二区三区妓女下载 | 亚洲视频一区二区在线观看 | 国产精品福利一区 | 国产午夜视频在线播放 | 成av人在线| 成人免费在线观看av | 91视频在线看 | 91亚洲国产成人精品性色 | 视频一区在线观看 | 国产一级做a爰片久久毛片男男 | 欧美日韩黄色一区二区 | 久久久视屏 | 天天操天天玩 | 久久久久久久综合 | 欧美日韩3p| 欧美成人精品欧美一 | 成人青青草 | 欧美日本三级 | 久久久久久欧美精品se一二三四 | 无码人妻av免费一区二区三区 | 欧美影音 | 91人人澡人人爽人人精品 | 花房姑娘免费观看全集 | 国产一卡二卡在线播放 | 亚洲av无码国产精品久久 | 欧美香蕉 | 欧美性极品xxxx做受 | 不卡三区 | 3d毛片| 女性爱爱视频 | 98超碰在线 | 高清免费视频日本 | 深夜精品| 国产精品高潮AV无码 | 好看的中文字幕 | 亚洲无限观看 | 欧美日韩在线视频免费播放 | 亚洲精品鲁一鲁一区二区三区 | 金8天国av | 国产l精品国产亚洲区久久 午夜青青草 | 伊人久久狼人 | 香蕉久久影院 | 国产午夜一区 | 日韩欧美精品在线视频 | 北条麻妃在线一区 | a黄视频 | 亚洲二三区 | 麻豆精品在线 | 久久特黄 | 欧美成人一区二区在线 | 无码熟妇人妻av | www操| 亚洲免费视频一区二区 | 永久免费看mv网站入口78 | 黄色片网站国产 | 胸网站| 图书馆的女友动漫在线观看 | 欧美成欧美va| 欧美精品四区 |