Install MySQL Server Community Edition on Fedora 20_MySQL

WBOY
リリース: 2016-05-31 08:47:04
オリジナル
1324 人が閲覧しました

Fedora

Today we are going to go through the process of installing MySQL Server Community Edition on Fedora 20.  You could of course simply use MariaDB, but this will focus on the Community Edition.

Install the MySQL Repository

We will need to install the MySQL Community Repository, the MySQL project hosts an RPM file with the repository.  First lets look at the repositories that I have already.

# yum repolistLoaded plugins: langpacks, refresh-packagekitrepo id repo name statusadobe-flashplayer Adobe Flash Player - x86_64 2fedora/20/x86_64 Fedora 20 - x86_64 38,597google-chrome Google Chrome - x86_64 3oracle-virtualbox/20/x86_64 Oracle VirtualBox - x86_64 10rpmfusion-free/20/x86_64 RPM Fusion for Fedora 20 - Free 468rpmfusion-free-updates/20/x86_64 RPM Fusion for Fedora 20 - Free - Updates 464rpmfusion-nonfree/20/x86_64 RPM Fusion for Fedora 20 - Nonfree 203rpmfusion-nonfree-updates/20/x86_64 RPM Fusion for Fedora 20 - Nonfree - Updates 299updates/20/x86_64 Fedora 20 - x86_64 - Updates 17,616repolist: 57,662
ログイン後にコピー

Now lets install the release file.  Keep in mind, you can do a separate wget or curl to download the file, or you can use the command as I have.  As of the time of this writing there are also repositories for Fedora 18 and 19 and Enterprise Linux 5, 6 and 7 (beta).  Though the only procedures I have validated are the Fedora 20, they should all work the same.

# yum localinstall http://dev.mysql.com/get/mysql-community-release-fc20-5.noarch.rpm
ログイン後にコピー

Now lets compare our new repositories to our old and we will see it has added 3 repositories, mysql56-community, mysql-tools-community and mysql-connectors-community

# yum repolistLoaded plugins: langpacks, refresh-packagekitrepo id repo name statusadobe-flashplayer Adobe Flash Player - x86_64 2fedora/20/x86_64 Fedora 20 - x86_64 38,597google-chrome Google Chrome - x86_64 3mysql-connectors-community/20/x86_64 MySQL Connectors Community 14mysql-tools-community/20/x86_64 MySQL Tools Community 8mysql56-community/20/x86_64 MySQL 5.6 Community Server 57oracle-virtualbox/20/x86_64 Oracle VirtualBox - x86_64 10rpmfusion-free/20/x86_64 RPM Fusion for Fedora 20 - Free 468rpmfusion-free-updates/20/x86_64 RPM Fusion for Fedora 20 - Free - Updates 464rpmfusion-nonfree/20/x86_64 RPM Fusion for Fedora 20 - Nonfree 203rpmfusion-nonfree-updates/20/x86_64 RPM Fusion for Fedora 20 - Nonfree - Updates 299updates/20/x86_64 Fedora 20 - x86_64 - Updates 17,616repolist: 57,741
ログイン後にコピー

Install MySQL Server Community

Now that we have the repository we can use yum list to determine what version is available.

# yum list mysql-community-serverLoaded plugins: langpacks, refresh-packagekitAvailable Packagesmysql-community-server.x86_64 5.6.19-1.fc20 mysql56-community
ログイン後にコピー

Then we can do a yum install to actually perform the install.

# yum install mysql-community-server
ログイン後にコピー

Enable the MySQL Server Software

Now we will set the mysqld service to start on reboot.

# systemctl enable mysqldln -s '/usr/lib/systemd/system/mysqld.service' '/etc/systemd/system/mysql.service'ln -s '/usr/lib/systemd/system/mysqld.service' '/etc/systemd/system/multi-user.target.wants/mysqld.service'
ログイン後にコピー

Now manually start the mysqld service.  For a development environment, I also added bind-address=127.0.0.1 to /etc/my.cnf under the [mysqld] section.

# service mysqld startRedirecting to /bin/systemctl start mysqld.service
ログイン後にコピー

Install MySQL Workbench Community

Now that we have the repository enabled we can also install additional software such as MySQL Workbench.

# yum install mysql-workbench
ログイン後にコピー
ソース:php.cn
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート
私たちについて 免責事項 Sitemap
PHP中国語ウェブサイト:福祉オンライン PHP トレーニング,PHP 学習者の迅速な成長を支援します!