RedHat下MySQL 5.6 安装、维护
准备环境:RedHat 5系统、MySQL 5.6 rpm包首先 上传mysql至服务器1、 解压缩MySql[root@www.linuxidc.com]# tar -xvf MySQL-5.6.
准备环境:
RedHat 5系统、MySQL 5.6 rpm包
首先 上传mysql至服务器
1、 解压缩MySql
[root@]# tar -xvf MySQL-5.6.2_m5-1.rhel5.i386.tar
MySQL-client-5.6.2_m5-1.rhel5.i386.rpm
MySQL-devel-5.6.2_m5-1.rhel5.i386.rpm
MySQL-embedded-5.6.2_m5-1.rhel5.i386.rpm
MySQL-server-5.6.2_m5-1.rhel5.i386.rpm
MySQL-shared-5.6.2_m5-1.rhel5.i386.rpm
MySQL-test-5.6.2_m5-1.rhel5.i386.rpm
2、 安装MySQL-server包
[root@]# rpm -ivh MySQL-server-5.6.2_m5-1.rhel5.i386.rpm
error:Failed dependencies:
MySQL conflicts with mysql-5.0.45-7.el5.i386
MySQL-serverconflicts with mysql-server-5.0.45-7.el5.i386
(安装失败,,由于系统先前安装有mysql,把它卸载掉!再安装)
[root@]# rpm -e mysql-5.0.45-7.el5.i386 --nodeps
[root@]# rpm -e mysql-server-5.0.45-7.el5.i386 –nodeps
[root@]# rpm -ivh MySQL-server-5.6.2_m5-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-server ###########################################[100%]
[root@]# rpm -ivh MySQL-client-5.6.2_m5-1.rhel5.i386.rpm
Preparing... ########################################### [100%]
1:MySQL-client ########################################### [100%]
3、 启动mysql并设置登录密码
[root@]# /etc/init.d/mysql start
StartingMySQL......[ OK ]
[root@shiyue5 u01]# mysqladmin -u rootpassword "123456"
4、 登录mysql并创建数据库
[root@shiyue5~]# mysql -u root -p
Enterpassword:
Welcometo the MySQL monitor. Commands end with; or \g.
YourMySQL connection id is 5
Serverversion: 5.6.2-m5 MySQL Community Server (GPL)
Copyright(c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracleis a registered trademark of Oracle Corporation and/or its
affiliates.Other names may be trademarks of their respective
owners.
Type'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>create database shiyue;
QueryOK, 1 row affected (0.01 sec)
5、 配置客户端连接
mysql>use mysql;
Readingtable information for completion of table and column names
Youcan turn off this feature to get a quicker startup with -A
Database changed
mysql>grant all on *.* to root@"%" identified by "123456";
QueryOK, 0 rows affected (0.00 sec)
通过对1042问题代码的查询,得出编辑/etc/my.cnf文件,在[mysqld]内添加一行skip-name-resolve
在/etc/目录下如没有my.cnf配置文件,则请到/usr/share/mysql/下找到*.cnf文件,拷贝其中的一个到/etc/并改名为my.cnf
[root@shiyue5~]# cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
[root@shiyue5~]# vi /etc/my.cnf
#Example MySQL config file for medium systems.
#
# Thisis for a system with little memory (32M - 64M) where MySQL plays
# animportant part, or systems up to 128M where MySQL is used together with
#other programs (such as a web server)
#
#MySQL programs look for option files in a set of
#locations which depend on the deployment platform.
# Youcan copy this option file to one of those
#locations. For information about these locations, see:
#
#
# Inthis file, you can use all long options that a program supports.
# Ifyou want to know which options a program supports, run the program
# withthe "--help" option.
# Thefollowing options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# Herefollows entries for some specific programs
# TheMySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-external-locking
key_buffer_size= 16M
max_allowed_packet= 1M
table_open_cache= 64
sort_buffer_size= 512K
net_buffer_length= 8K
read_buffer_size= 256K
read_rnd_buffer_size= 512K
myisam_sort_buffer_size= 8M
skip-name-resolve
#Don't listen on a TCP/IP port at all. This can be a security enhancement,
# ifall processes that need to connect to mysqld run on the same host.
# Allinteraction with mysqld must be made via Unix sockets or named pipes.
"/etc/my.cnf"145L, 4700C written

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

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

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

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

redhat linux는 무료이며 사용자는 Redhat을 무료로 사용할 수 있지만 Redhat 서비스는 유료입니다. 즉, 사용자는 Redhat을 무료로 사용할 수 있지만 Redhat 회사의 서비스를 받으려면 일정 비용을 지불해야 합니다.

Redhat에 php와 mysql을 설치하는 방법: 1. "yum install httpd"를 통해 Apache2를 설치하고 시작합니다. 2. "yum install mysql mysql-server"를 사용하여 MySQL을 설치하고 시작합니다. 3. "yum install php"를 통해 PHP를 설치합니다. "를 선택한 다음 다시 시작하십시오. PHP를 적용하려면 Apache를 시작하십시오.

CentOS 소개 CentOS는 Community ENTerprise Operating System의 약어입니다. 우리 중 많은 사람들이 이를 Community Enterprise Operating System이라고 부르지만 이는 Linux 운영 체제의 릴리스 버전입니다. CentOS는 새로운 Linux 배포판이 아닙니다. RedHat이라는 이름을 들으면 누구나 들어본 것 같습니다. RedHat 제품군에는 RedHat EnterpriseLinux(이하 RHEL)라는 제품의 엔터프라이즈 버전이 있으며, CentOS는 이 RHEL의 복제 버전입니다. RHEL은 많은 기업에서 채택하는 Linux 배포판입니다. RedH에 문의해야 합니다.

오늘은 어떤 설정이 수정되었는지 모르겠습니다. vim에서 프로그램을 작성할 때 작은따옴표나 큰따옴표를 모두 입력할 수 없다는 것을 발견했습니다. 큰따옴표의 효과는 ¨¨이며, 이로 인해 프로그램 오류가 발생합니다! 이 문제가 발생하는 이유는 키보드 레이아웃이 실제 상황과 일치하지 않아 수정이 필요하기 때문입니다. 입력할 수 없는 작은따옴표/큰따옴표에 대한 해결 방법: (참고: 바탕 화면이 영어인 경우 직접 번역하십시오.) 1. 시스템->관리 선택->키보드 선택을 클릭하고 American International을 American English로 변경합니다. 스타일! 2. 시스템-->기본 설정 선택-->키보드 선택을 클릭합니다. 설정이 아래 그림과 일치하는지 확인하십시오. 그런 다음 vim 도구를 다시 열면 문제가 해결됩니다!

MySQL 설치 실패의 주된 이유는 다음과 같습니다. 1. 권한 문제, 관리자로 실행하거나 Sudo 명령을 사용해야합니다. 2. 종속성이 누락되었으며 관련 개발 패키지를 설치해야합니다. 3. 포트 충돌, 포트 3306을 차지하는 프로그램을 닫거나 구성 파일을 수정해야합니다. 4. 설치 패키지가 손상되어 무결성을 다운로드하여 확인해야합니다. 5. 환경 변수가 잘못 구성되었으며 운영 체제에 따라 환경 변수를 올바르게 구성해야합니다. 이러한 문제를 해결하고 각 단계를 신중하게 확인하여 MySQL을 성공적으로 설치하십시오.

Red Hat Linux의 특징: 1. 다중 사용자 및 다중 작업 운영 체제, 하나의 컴퓨터는 여러 사용자가 동시에 사용할 수 있으며 여러 사용자가 제출한 여러 작업을 동시에 수행할 수 있습니다. 2. 우수한 호환성; 3. 휴대용 컴퓨터, 개인용 컴퓨터, 소형 컴퓨터, 중형 컴퓨터 또는 대형 컴퓨터 등 강력한 이식성으로 Linux를 실행할 수 있습니다. 4. 높은 안정성, 신뢰성 및 보안성; .

이 기사는 MySQL 데이터베이스의 작동을 소개합니다. 먼저 MySQLworkBench 또는 명령 줄 클라이언트와 같은 MySQL 클라이언트를 설치해야합니다. 1. MySQL-Uroot-P 명령을 사용하여 서버에 연결하고 루트 계정 암호로 로그인하십시오. 2. CreateABase를 사용하여 데이터베이스를 작성하고 데이터베이스를 선택하십시오. 3. CreateTable을 사용하여 테이블을 만들고 필드 및 데이터 유형을 정의하십시오. 4. InsertInto를 사용하여 데이터를 삽입하고 데이터를 쿼리하고 업데이트를 통해 데이터를 업데이트하고 DELETE를 통해 데이터를 삭제하십시오. 이러한 단계를 마스터하고 일반적인 문제를 처리하는 법을 배우고 데이터베이스 성능을 최적화하면 MySQL을 효율적으로 사용할 수 있습니다.

MySQL 데이터베이스 파일 파일 경로 설정에서 오류를 수정하는 방법 : 1. MySQL 서비스 중지; 2. 데이터 백업을 강력히 권장합니다. 3. 구성 파일의 Datadir 매개 변수를 올바른 경로로 수정하고 MySQL 사용자가 읽기 및 쓰기 권한을 가지고 있는지 확인하십시오. 4. 새 데이터 디렉토리를 작성하는 것이 좋습니다. 5. MySQL 서비스 시작; 6. 데이터베이스가 정상적으로 실행 중인지 확인하고 데이터 무결성을 확인하십시오. 데이터 손실을 피하기 위해주의해서 작동하십시오.
