CentOS 7に最新版のMariaDBをインストール、初期設定をする

概要

MariaDBの最新をインストール、初期設定を行い、ログイン出来るようにするまでの作業日記。

環境
OS:CentOS7

MariaDBの最新は10.3(2018年07月現在)。

そのままyumでインストールしようとしたら、古いバージョンだったのでリポジトリを追加する作業が必要だった。

はじめに

以下の手順はすべてroot権限でログインしている時のコマンドです。

キーワード

MariaDB

MySQLから派生したオープソースのデータベース。CentOS7からMySQLに代わり、このMariaDBが標準となっている。

手順

古いバージョンを削除

今インストールされているMariaDBを確認する。

-qaはインストール済み、-iは大文字小文字を判別しないの意味。
 
自分のには入ってなかったが、もしあったら以下のコマンドで削除する。

インストール

yumでインストールされるMariaDBのバージョンを確認

5.5なので古い。そこでリポジトリを追加する。

vimでリポジトリを記載する。

 
で以下を追加する。

追加内容は、MariaDBの公式サイトで確認した。

インストールする(コマンドは公式サイトを参照した)

起動と起動時のサービスの登録

MariaDBを起動

 
起動を確認

これで、active(runnning)という緑の文字が出てくれば起動している。

OS再起動時にサービスを自動で起動するよう登録

初期設定

初期設定を開始

 
質問される内容の日本語訳

質問 日本語
Enter current password for root (enter for none) 今のrootパスワードを入力(インストール直後はパスが設定されていないのでEnterでOK)
Set root password? [Y/n] パスワードを設定するか?
Remove anonymous users? [Y/n] 匿名用ユーザーを削除するか?
Disallow root login remotely? [Y/n] リモートでrootログインを禁止するか?
Remove test database and access to it? [Y/n] テストデータベースを削除するか?
Reload privilege tables now? [Y/n] 権限テーブルを再読み込みするか?

設定が終わったらMariaDBにrootでログイン出来るか確認する。mariadbでは無くてmysqlコマンドを使うようだ。

 
設定したパスワードを入れて、以下のメッセージが出たら接続完了。

exitで終了する。

これで一連の作業が完了。

関連する、参考にしたサイト

・MariaDB公式:https://mariadb.org/
・MariaDB公式(初期設定):https://mariadb.com/kb/ja/mysql_secure_installation/

3,372 件のコメント

  • Order Cheap Amoxicilina Flemoxon In Germany Free Shipping Cialis Nebenwirkungen Herzinfarkt cialis Isotretinoin Isotrex Precio Cialis 20 Mg Farmacias Verkaufe Levitra

  • It’s not my first time to pay a visit this web site, i am
    browsing this website dailly and obtain nice data from here every day.

  • In der Familie erlernen Kinder grundlegende Werte wie Verantwortung, SolidaritГ¤t und Gemeinsinn. buy viagra online Can you buy prednisone over the counter in canada best generic priligy cheap viagra express delivery buy tetracycline in uk.

  • Wonderful beat ! I would like to apprentice while you amend your web site, how
    could i subscribe for a blog website? The account aided me a acceptable deal.
    I have been a little bit acquainted of this your broadcast provided vivid clear idea

  • Nice post. I was checking constantly this blog and I am impressed!

    Extremely useful info specifically the last part 🙂 I care
    for such information much. I was looking for this particular information for a long time.
    Thank you and good luck.

  • Hello would you mind sharing which blog platform you’re working
    with? I’m going to start my own blog in the near future but I’m having a tough time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and I’m
    looking for something completely unique. P.S Apologies for being off-topic but I
    had to ask!

  • Undeniably believe that which you said. Your favorite justification appeared
    to be on the web the easiest factor to keep in mind of.
    I say to you, I certainly get irked whilst other people think about
    concerns that they plainly don’t know about. You managed to
    hit the nail upon the top and also outlined out the whole thing with no need side effect , folks could take a signal.
    Will likely be again to get more. Thanks

  • Undeniably believe that which you stated. Your favorite
    justification appeared to be on the net the simplest thing to be aware of.
    I say to you, I certainly get irked while people think about worries that they plainly do not know about.
    You managed to hit the nail upon the top and defined out the whole thing
    without having side-effects , people could take a signal.
    Will likely be back to get more. Thanks

  • Will Propecia Work Forever Thinning Hair Amoxicillin Veterinary Use Cats Healthy Man Reviews Rx Dth 24 B Kamal Kunj Mumbai India Tetracycline 500mg

  • Having read this I thought it was extremely enlightening.
    I appreciate you finding the time and energy to put this content together.
    I once again find myself personally spending a lot of time both reading and posting comments.
    But so what, it was still worth it!

  • Admiring the time and energy you put into your website and in depth
    information you offer. It’s great to come across a blog every once in a while that isn’t the same
    unwanted rehashed information. Excellent read!
    I’ve saved your site and I’m adding your RSS feeds to my Google account.

  • If you have a medication that you place under your tongue when you feel chest pain, it is probably nitroglycerin, and should not be combined with Viagra or the other two erectile dysfunction medications, Cialis (tadalafil) and Levitra (vardenafil). order viagra online However, things have changed quite a bit over the last 15 years.

  • Just want to say your article is as surprising.
    The clearness in your post is just cool and i can assume
    you are an expert on this subject. Well with your permission let me to grab your RSS
    feed to keep up to date with forthcoming post.
    Thanks a million and please continue the rewarding
    work.

  • Hey there! I could have sworn I’ve been to this website before but after checking
    through some of the post I realized it’s new to me. Anyways, I’m definitely
    delighted I found it and I’ll be bookmarking and checking back often!

  • Very nice post. I simply stumbled upon your blog and wished to mention that I have really
    loved browsing your blog posts. In any case I will be subscribing on your feed and
    I am hoping you write again soon!

  • You actually make it seem so easy along with your presentation however I in finding this matter to be really one thing that I think I’d never understand.

    It kind of feels too complicated and extremely huge for me.
    I am having a look ahead to your subsequent post, I will try to
    get the cling of it!

  • We’re a group of volunteers and starting a new scheme in our community.
    Your web site offered us with helpful information to work on. You’ve performed
    an impressive job and our entire neighborhood will likely be grateful to you.

  • Hello there! I know this is somewhat off topic but I was wondering if you
    knew where I could locate a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having difficulty finding
    one? Thanks a lot!

  • Hi there to every body, it’s my first pay a quick visit of this website; this web site consists of remarkable
    and in fact excellent material in favor of visitors.

  • Excellent blog right here! Also your website loads
    up very fast! What web host are you using? Can I get your associate hyperlink
    on your host? I wish my web site loaded up as fast as yours lol

  • You’re so awesome! I do not suppose I’ve truly read a
    single thing like this before. So wonderful to find somebody with unique
    thoughts on this subject matter. Seriously.. many thanks for starting this up.
    This website is one thing that is required on the web, someone
    with some originality!

  • I was curious if you ever thought of changing the layout of
    your site? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having one or 2 images.
    Maybe you could space it out better?

  • Unquestionably believe that which you stated.
    Your favorite reason seemed to be on the
    net the easiest thing to be aware of. I say to you, I definitely get irked
    while people think about worries that they just don’t know about.
    You managed to hit the nail upon the top as well as defined out the whole thing without having side effect ,
    people could take a signal. Will likely be back to get more.
    Thanks

  • Hello there! This article couldn’t be written much better!
    Looking at this article reminds me of my previous roommate!

    He constantly kept preaching about this. I will forward this information to him.

    Pretty sure he’ll have a very good read. Thank you for sharing!

  • You are a really persuasive writer. I can see this in your writeup. You’ve a way of writing compelling info that sparks significantly interest. baebdkbkbaad