目次
CentOS 6.5上安装MariaDB

CentOS6.5上安装MariaDB

Jun 07, 2016 pm 03:28 PM
centos mariadb インストール

CentOS 6.5上安装MariaDB 作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs 1、软件环境: CentOS 6.5 x64 2、安装过程 1)在/etc/yum.repos.d/目录创建MariaDB.repo文件,内容如下: # MariaDB 5.5 CentOS repository list - created 2014-0

CentOS 6.5上安装MariaDB

作者:chszs,转载需注明。博客主页:http://blog.csdn.net/chszs
1、软件环境: CentOS 6.5 x64
2、安装过程 1)在/etc/yum.repos.d/目录创建MariaDB.repo文件,内容如下:
# MariaDB 5.5 CentOS repository list - created 2014-03-04 11:20 UTC # http://mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/5.5/centos6-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
# yum install MariaDB-server MariaDB-client Loaded plugins: fastestmirror, security base | 3.7 kB 00:00 base/primary_db | 4.4 MB 01:11 extras | 3.4 kB 00:00 extras/primary_db | 19 kB 00:00 mariadb | 1.9 kB 00:00 mariadb/primary_db | 15 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 2.1 MB 00:22 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package MariaDB-client.x86_64 0:5.5.36-1.el6 will be obsoleting --> Processing Dependency: MariaDB-common for package: MariaDB-client-5.5.36-1.el6.x86_64 ---> Package MariaDB-server.x86_64 0:5.5.36-1.el6 will be obsoleting ---> Package mysql.x86_64 0:5.1.71-1.el6 will be obsoleted ---> Package mysql-server.x86_64 0:5.1.71-1.el6 will be obsoleted --> Running transaction check ---> Package MariaDB-common.x86_64 0:5.5.36-1.el6 will be installed --> Processing Dependency: MariaDB-compat for package: MariaDB-common-5.5.36-1.el6.x86_64 --> Running transaction check ---> Package MariaDB-compat.x86_64 0:5.5.36-1.el6 will be obsoleting ---> Package mysql-libs.x86_64 0:5.1.71-1.el6 will be obsoleted --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================== Package Arch Version Repository Size ================================================================================================================== Installing: MariaDB-client x86_64 5.5.36-1.el6 mariadb 10 M replacing mysql.x86_64 5.1.71-1.el6 MariaDB-compat x86_64 5.5.36-1.el6 mariadb 2.7 M replacing mysql-libs.x86_64 5.1.71-1.el6 MariaDB-server x86_64 5.5.36-1.el6 mariadb 42 M replacing mysql-server.x86_64 5.1.71-1.el6 Installing for dependencies: MariaDB-common x86_64 5.5.36-1.el6 mariadb 23 k Transaction Summary ================================================================================================================== Install 4 Package(s) Total download size: 55 M Is this ok [y/N]: y Downloading Packages: (1/4): MariaDB-5.5.36-centos6-x86_64-client.rpm | 10 MB 04:45 (2/4): MariaDB-5.5.36-centos6-x86_64-common.rpm | 23 kB 00:00 (3/4): MariaDB-5.5.36-centos6-x86_64-compat.rpm | 2.7 MB 01:02 (4/4): MariaDB-5.5.36-centos6-x86_64-server.rpm | 42 MB 17:44 ------------------------------------------------------------------------------------------------------------------ Total 40 kB/s | 55 MB 23:34 warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY Retrieving key from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB Importing GPG key 0x1BB943DB: Userid: "Daniel Bartholomew (Monty Program signing key) " From : https://yum.mariadb.org/RPM-GPG-KEY-MariaDB Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : MariaDB-compat-5.5.36-1.el6.x86_64 1/7 Installing : MariaDB-common-5.5.36-1.el6.x86_64 2/7 Error in PREIN scriptlet in rpm package MariaDB-server-5.5.36-1.el6.x86_64 ****************************************************************** A MySQL or MariaDB server package (mysql-server-5.1.71-1.el6.x86_64) is installed. The current MariaDB server package is provided by a different vendor (CentOS) than Monty Program AB. Some files may be installed to different locations, including log files and the service startup script in /etc/init.d/. Upgrading directly from MySQL 5.1 to MariaDB 5.5 may not be safe in all cases. A manual dump and restore using mysqldump is recommended. It is important to review the MariaDB manual's Upgrading section for version-specific incompatibilities. A manual upgrade is required. - Ensure that you have a complete, working backup of your data and my.cnf files - Shut down the MySQL server cleanly - Remove the existing MySQL packages. Usually this command will list the packages you should remove: rpm -qa | grep -i '^mysql-' You may choose to use 'rpm --nodeps -ev ' to remove the package which contains the mysqlclient shared library. The library will be reinstalled by the MariaDB-shared package. - Install the new MariaDB packages supplied by Monty Program AB - Ensure that the MariaDB server is started - Run the 'mysql_upgrade' program This is a brief description of the upgrade process. Important details can be found in the MariaDB manual, in the Upgrading section. ****************************************************************** error: %pre(MariaDB-server-5.5.36-1.el6.x86_64) scriptlet failed, exit status 1 error: install: %pre scriptlet failed (2), skipping MariaDB-server-5.5.36-1.el6 Installing : MariaDB-client-5.5.36-1.el6.x86_64 4/7 Erasing : mysql-5.1.71-1.el6.x86_64 5/7 Erasing : mysql-libs-5.1.71-1.el6.x86_64 6/7 Verifying : MariaDB-common-5.5.36-1.el6.x86_64 1/7 Verifying : MariaDB-compat-5.5.36-1.el6.x86_64 2/7 Verifying : MariaDB-client-5.5.36-1.el6.x86_64 3/7 Verifying : mysql-libs-5.1.71-1.el6.x86_64 4/7 Verifying : MariaDB-server-5.5.36-1.el6.x86_64 5/7 mysql-server-5.1.71-1.el6.x86_64 was supposed to be removed but is not! Verifying : mysql-server-5.1.71-1.el6.x86_64 6/7 Verifying : mysql-5.1.71-1.el6.x86_64 7/7 Installed: MariaDB-client.x86_64 0:5.5.36-1.el6 MariaDB-compat.x86_64 0:5.5.36-1.el6 Dependency Installed: MariaDB-common.x86_64 0:5.5.36-1.el6 Replaced: mysql.x86_64 0:5.1.71-1.el6 mysql-libs.x86_64 0:5.1.71-1.el6 Failed: MariaDB-server.x86_64 0:5.5.36-1.el6 mysql-server.x86_64 0:5.1.71-1.el6 Complete!
3、启动MariaDB 
ログイン後にコピー
# /etc/init.d/mysqld start
Initializing MySQL database:  WARNING: The host 'Cloud-Q2' could not be looked up with 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...
OK
Filling help tables...
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:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h Cloud-Q2 password 'new-password'

Alternatively you can run:
/usr/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 /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

                                                           [  OK  ]
Starting mysqld:                                           [  OK  ]
ログイン後にコピー

4、为MariaDB设置密码
# /usr/bin/mysqladmin -u root password 'adminadmin'
ログイン後にコピー

MySQL [(none)]> use mysql; MySQL [mysql]> update user set host='%' where user='root' and host='127.0.0.1'; MySQL [mysql]> grant all privileges on *.* to 'root'@'%' identified by 'adminadmin' with grant option; MySQL [mysql]> flush privileges;
# vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
# service iptables restart
このウェブサイトの声明
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。

ホットAIツール

Undresser.AI Undress

Undresser.AI Undress

リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover

AI Clothes Remover

写真から衣服を削除するオンライン AI ツール。

Undress AI Tool

Undress AI Tool

脱衣画像を無料で

Clothoff.io

Clothoff.io

AI衣類リムーバー

Video Face Swap

Video Face Swap

完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

ホットツール

メモ帳++7.3.1

メモ帳++7.3.1

使いやすく無料のコードエディター

SublimeText3 中国語版

SublimeText3 中国語版

中国語版、とても使いやすい

ゼンドスタジオ 13.0.1

ゼンドスタジオ 13.0.1

強力な PHP 統合開発環境

ドリームウィーバー CS6

ドリームウィーバー CS6

ビジュアル Web 開発ツール

SublimeText3 Mac版

SublimeText3 Mac版

神レベルのコード編集ソフト(SublimeText3)

Centosのgitlabのバックアップ方法は何ですか Centosのgitlabのバックアップ方法は何ですか Apr 14, 2025 pm 05:33 PM

Centosシステムの下でのGitlabのバックアップと回復ポリシーデータセキュリティと回復可能性を確保するために、Gitlab on Centosはさまざまなバックアップ方法を提供します。この記事では、いくつかの一般的なバックアップ方法、構成パラメーター、リカバリプロセスを詳細に紹介し、完全なGitLabバックアップと回復戦略を確立するのに役立ちます。 1.手動バックアップGitlab-RakeGitlabを使用:バックアップ:コマンドを作成して、マニュアルバックアップを実行します。このコマンドは、gitlabリポジトリ、データベース、ユーザー、ユーザーグループ、キー、アクセスなどのキー情報をバックアップします。デフォルトのバックアップファイルは、/var/opt/gitlab/backupsディレクトリに保存されます。 /etc /gitlabを変更できます

Centosシャットダウンコマンドライン Centosシャットダウンコマンドライン Apr 14, 2025 pm 09:12 PM

Centos Shutdownコマンドはシャットダウンし、構文はシャットダウン[オプション]時間[情報]です。オプションは次のとおりです。-hシステムをすぐに停止します。 -pシャットダウン後に電源をオフにします。 -r再起動; -t待機時間。時間は、即時(現在)、数分(分)、または特定の時間(HH:mm)として指定できます。追加の情報をシステムメッセージに表示できます。

CentosとUbuntuの違い CentosとUbuntuの違い Apr 14, 2025 pm 09:09 PM

Centosとubuntuの重要な違いは次のとおりです。起源(CentosはRed Hat、for Enterprises、UbuntuはDebianに由来します。個人用のDebianに由来します)、パッケージ管理(CentosはYumを使用し、安定性に焦点を当てます。チュートリアルとドキュメント)、使用(Centosはサーバーに偏っています。Ubuntuはサーバーやデスクトップに適しています)、その他の違いにはインストールのシンプルさが含まれます(Centos is Thin)

CentOS構成IPアドレス CentOS構成IPアドレス Apr 14, 2025 pm 09:06 PM

CentosでIPアドレスを構成する手順:現在のネットワーク構成を表示します:IP ADDRネットワーク構成ファイルを編集するファイル:Sudo VI/etc/sysconfig/network-scripts/ifcfg-eth0変更IPアドレス:iPaddr =編集マスクとゲートウェイの変更(オプション):Netmask = and edit edit gatewway = neters rettart rettart the sudo system system systemctrat

CentOS HDFS構成を最適化する方法 CentOS HDFS構成を最適化する方法 Apr 14, 2025 pm 07:15 PM

CENTOSのHDFSパフォーマンスの向上:CENTOSのHDFS(Hadoop分散ファイルシステム)を最適化するための包括的な最適化ガイドには、ハードウェア、システム構成、ネットワーク設定を包括的に検討する必要があります。この記事では、HDFSパフォーマンスを改善するのに役立つ一連の最適化戦略を提供します。 1.ハードウェアのアップグレードと選択リソースの拡張:サーバーのCPU、メモリ、ストレージ容量を可能な限り増やします。高性能ハードウェア:高性能ネットワークカードとスイッチを採用して、ネットワークスループットを改善します。 2。システム構成微調整カーネルパラメーター調整:/etc/sysctl.confファイルを変更して、TCP接続番号、ファイルハンドル番号、メモリ管理などのカーネルパラメーターを最適化します。たとえば、TCP接続ステータスとバッファサイズを調整します

Centos HDFS構成の一般的な誤解は何ですか? Centos HDFS構成の一般的な誤解は何ですか? Apr 14, 2025 pm 07:12 PM

Hadoop分散ファイルシステム(HDFS)構成の一般的な問題とソリューションは、CentOSにHadoophDFSクラスターを構築する際に、パフォーマンスの劣化、データの損失、さらにはクラスターが開始できない場合があります。この記事では、これらの一般的な問題とそのソリューションをまとめて、これらの落とし穴を回避し、HDFSクラスターの安定性と効率的な動作を確保します。ラックアウェア構成エラー:問題:ラックアウェア情報が正しく構成されていないため、データブロックレプリカの不均一な分布とネットワーク負荷が増加します。解決策:hdfs-site.xmlファイルでラックアウェア構成を再確認し、hdfsdfsadmin-printtopoを使用します

HDFSでCentosを構成するために必要な手順 HDFSでCentosを構成するために必要な手順 Apr 14, 2025 pm 06:42 PM

CENTOSシステムにHadoop分散ファイルシステム(HDFS)を構築するには、複数のステップが必要です。この記事では、簡単な構成ガイドを提供します。 1.初期段階でJDKをインストールする準備:すべてのノードにJavadevelopmentKit(JDK)をインストールすると、バージョンはHadoopと互換性がある必要があります。インストールパッケージは、Oracleの公式Webサイトからダウンロードできます。環境変数構成: /etc /プロファイルファイルを編集し、JavaおよびHadoop環境変数を設定して、システムがJDKとHadoopのインストールパスを見つけることができるようにします。 2。セキュリティ構成:SSHパスワードなしログインSSHキーを生成する:各ノードでSSH-KeyGenコマンドを使用する

MySQLをCentos7にインストールする方法 MySQLをCentos7にインストールする方法 Apr 14, 2025 pm 08:30 PM

MySQLをエレガントにインストールするための鍵は、公式のMySQLリポジトリを追加することです。特定の手順は次のとおりです。MYSQLの公式GPGキーをダウンロードして、フィッシング攻撃を防ぎます。 mysqlリポジトリファイルを追加:rpm -uvh https://dev.mysql.com/get/mysql80-community-rease-el7-3.noarch.rpm update yumリポジトリキャッシュ:yumアップデートインストールmysql:yumインストールmysql-server startup mysql sportin

See all articles