목차
CentOS 6.5上安装MariaDB
데이터 베이스 MySQL 튜토리얼 CentOS6.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 옷 제거제

AI Hentai Generator

AI Hentai Generator

AI Hentai를 무료로 생성하십시오.

인기 기사

R.E.P.O. 에너지 결정과 그들이하는 일 (노란색 크리스탈)
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 최고의 그래픽 설정
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. 아무도들을 수없는 경우 오디오를 수정하는 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25 : Myrise에서 모든 것을 잠금 해제하는 방법
3 몇 주 전 By 尊渡假赌尊渡假赌尊渡假赌

뜨거운 도구

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

센토스로 중국어 입력하는 방법 센토스로 중국어 입력하는 방법 Apr 07, 2024 pm 08:21 PM

CentOS에서 중국어 입력을 사용하는 방법에는 fcitx 입력 방법 사용: fcitx 설치 및 활성화, 단축키 설정, 단축키를 눌러 입력 방법 전환, 병음을 입력하여 후보 단어 생성 등이 있습니다. iBus 입력 방법 사용: iBus를 설치 및 활성화하고, 단축키를 설정하고, 단축키를 눌러 입력 방법을 전환하고, 병음을 입력하여 후보 단어를 생성합니다.

centos7에서 USB 디스크 파일을 읽는 방법 centos7에서 USB 디스크 파일을 읽는 방법 Apr 07, 2024 pm 08:18 PM

CentOS 7에서 U 디스크 파일을 읽으려면 먼저 U 디스크를 연결하고 장치 이름을 확인해야 합니다. 그런 다음 다음 단계를 사용하여 파일을 읽습니다. USB 플래시 드라이브 마운트: mount /dev/sdb1 /media/sdb1("/dev/sdb1"을 실제 장치 이름으로 대체) USB 플래시 드라이브 파일 찾아보기: ls /media /sdb1; cd /media /sdb1/디렉토리;

SCP 사용 팁 - 파일을 재귀적으로 제외 SCP 사용 팁 - 파일을 재귀적으로 제외 Apr 22, 2024 am 09:04 AM

scp 명령을 사용하여 네트워크 호스트 간에 파일을 안전하게 복사할 수 있습니다. 데이터 전송 및 인증을 위해 SSH를 사용합니다. 일반적인 구문은 다음과 같습니다: scpfile1user@host:/path/to/dest/scp -r/path/to/source/user@host:/path/to/dest/scp 파일 제외 scp 명령을 사용할 때는 할 수 없을 것 같습니다 파일을 필터링하거나 제외합니다. 그러나 파일을 제외하고 SSH를 사용하여 안전하게 복사하는 좋은 해결 방법이 있습니다. 이 페이지에서는 scp를 사용하여 디렉터리를 반복적으로 복사할 때 파일을 필터링하거나 제외하는 방법을 설명합니다. rsync 명령을 사용하여 파일을 제외하는 방법 구문은 다음과 같습니다: rsyncav-essh-

centos 로그인 비밀번호를 잊어버린 경우 어떻게 해야 하나요? centos 로그인 비밀번호를 잊어버린 경우 어떻게 해야 하나요? Apr 07, 2024 pm 07:33 PM

잊어버린 CentOS 비밀번호에 대한 해결 방법은 다음과 같습니다. 단일 사용자 모드: 단일 사용자 모드로 들어가서 passwd root를 사용하여 비밀번호를 재설정합니다. 복구 모드: CentOS Live CD/USB에서 부팅하고 루트 파티션을 마운트하고 비밀번호를 재설정합니다. 원격 액세스: SSH를 사용하여 원격으로 연결하고 sudo passwd root로 비밀번호를 재설정합니다.

centos7에서 루트 권한을 활성화하는 방법 centos7에서 루트 권한을 활성화하는 방법 Apr 07, 2024 pm 08:03 PM

CentOS 7은 기본적으로 루트 권한을 비활성화합니다. 다음 단계에 따라 활성화할 수 있습니다. 임시 활성화: 터미널에 "su root"를 입력하고 루트 비밀번호를 입력합니다. 영구적으로 활성화됨: "/etc/ssh/sshd_config"를 편집하고 "PermitRootLogin no"를 "yes"로 변경한 후 SSH 서비스를 다시 시작합니다.

centos7에서 루트 권한을 얻는 방법 centos7에서 루트 권한을 얻는 방법 Apr 07, 2024 pm 07:57 PM

CentOS 7에서 루트 권한을 얻는 방법에는 여러 가지가 있습니다. 1. "su"를 사용하여 명령을 실행합니다. 2. 단일 명령을 실행하려면 "sudo"를 사용하십시오. 3. 루트 사용자를 활성화하고 비밀번호를 설정합니다. 참고: 루트 권한을 사용할 때는 시스템이 손상될 수 있으므로 주의하십시오.

CentOS에서 루트 권한을 입력하는 방법 CentOS에서 루트 권한을 입력하는 방법 Apr 07, 2024 pm 08:06 PM

CentOS에서 루트 권한으로 작업을 수행하는 방법에는 두 가지가 있습니다. 1) sudo 명령을 사용하여 일시적으로 루트 권한을 얻습니다. 2) 루트 사용자 비밀번호를 사용하여 직접 로그인합니다. 루트 권한을 사용할 때는 각별히 주의해야 하며 필요한 경우에만 사용하는 것이 좋습니다.

Centos에서 게이트웨이를 구성하는 방법 Centos에서 게이트웨이를 구성하는 방법 Apr 07, 2024 pm 08:51 PM

CentOS를 게이트웨이로 구성하려면 다음 단계를 수행해야 합니다. 1. 네트워크 인터페이스를 구성하고 GATEWAY 값을 추가합니다. 2. 기본 게이트웨이를 설정하고 DNS 정보를 지정합니다. 3. 네트워크 서비스를 시작합니다. 5. 게이트웨이를 통한 트래픽을 허용하도록 방화벽을 구성합니다(선택 사항).

See all articles