300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > Ubuntu修改MySQL数据库datadir目录

Ubuntu修改MySQL数据库datadir目录

时间:2019-07-10 13:31:29

相关推荐

Ubuntu修改MySQL数据库datadir目录

概述

本文描述了在Ubuntu 16.04系统下修改mysql-server-5.7数据库datadir目录的详细步骤。目标:将数据库目录datadir/var/lib/mysql修改到/home/database/mysql

系统信息:

$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 16.04.3 LTSRelease: 16.04Codename: xenial$ uname -aLinux Ubuntu 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC x86_64 x86_64 x86_64 GNU/Linux

mysql-server版本:

Server version: 5.7.11-0ubuntu6 (Ubuntu)Copyright (c) 2000, , Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.

步骤

以下步骤需要停止mysql服务并假设用户拥有管理员权限。

一、停止mysql服务

sudo service mysql stop

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。