데이터 베이스 MySQL 튜토리얼 oracle收购Mysql后,Mysql的安装配置方法_MySQL

oracle收购Mysql后,Mysql的安装配置方法_MySQL

Jun 01, 2016 pm 01:28 PM
mysql oracle

bitsCN.com

oracle收购Mysql后,Mysql的安装配置方法

 

现在在oracle官网上下载的mysql有以下几个rpm包

 

MySQL-client-advanced

 

MySQL-devel-advanced

 

MySQL-embedded-advanced-5.6.14-1.rhel5.x86_64.rpm

 

MySQL-server-advanced-5.6.14-1.rhel5.x86_64.rpm

 

MySQL-shared-advanced-5.6.14-1.rhel5.x86_64.rpm

 

MySQL-shared-compat-advanced-5.6.14-1.rhel5.x86_64.rpm

 

MySQL-test-advanced-5.6.14-1.rhel5.x86_64.rpm

 

1、先把系统里安装的所有mysql找出来

 

#rpm -qa | grep -i mysql 运行此命令后,显示所有列表:

 

mysqlclient10-3.23.58-4.RHEL4.1

 

mysqlclient10-devel-3.23.58-4.RHEL4.1

 

2、将列表一一强制删除:

 

#rpm -ev --nodeps mysqlclient10-3.23.58-4.RHEL4.1

 

#rpm -ev --nodeps mysqlclient10-devel-3.23.58-4.RHEL4.1

 

3、将老版本的几个文件手工删除:

 

#rm -f /etc/my.cnf

 

#rm -rf /var/lib/mysql

 

#rm -rf/var/share/mysql

 

# rm -rf/usr/bin/mysql*

 

 4.安装下载的版本的mysql,如上,

 

[root@oracle11 ~]#rpm -ivh MySQL-server-advanced-5.6.14-1.el6.x86_64.rpm

 

Preparing...               ########################################### [100%]

 

   1:MySQL-server-advanced  ###########################################[100%]

 

5.安装client

 

[root@oracle11 ~]#rpm -ivh MySQL-client-advanced-5.6.14-1.el6.x86_64.rpm

 

Preparing...               ########################################### [100%]

 

   1:MySQL-client-advanced  ###########################################[100%]

 

说明:不安装mysql-client是不能使用mysql工具登陆到mysql数据库

 

6.oracle收购Mysql后,新版的mysql刚安装完mysql后不能直接输入mysql登录数据库,而是设置了默认free password密码,默认密码放在了/root/.mysql_secret文件中,登陆后需要修改密码

 

安装完成后有这么一段话,

 

A RANDOMPASSWORD HAS BEEN SET FOR THE MySQL root USER !

 

You willfind that password in '/root/.mysql_secret'.

 

 

 

You must change thatpassword on your first connect,

 

no other statementbut 'SET PASSWORD' will beaccepted.

 

See the manual forthe semantics of the 'password expired' flag.

 

 

 

Also, the accountfor the anonymous user has been removed.

 

 

 

In addition, you canrun:

 

 

 

  /usr/bin/mysql_secure_installation

 

 

 

which will also giveyou the option of removing the test database.

 

This is stronglyrecommended for production servers.

 

 

 

See the manual formore instructions.

 

 

 

Please report anyproblems with the /usr/bin/mysqlbug script!

 

 

 

The latestinformation about MySQL is available on the web at

 

 

 

  http://www.mysql.com

 

 

 

Support MySQL bybuying support/licenses at http://shop.mysql.com

 

 

 

New default configfile was created as /usr/my.cnf and

 

will be used bydefault by the server when you start it.

 

You may edit thisfile to change server settings

 

7.修改密码

 

(1)查看文件寻找密码

 

[root@oracle11 ~]#vi /root/.mysql_secret

 

 

 

# The randompassword set for the root user at Mon Oct 28 11:09:39 2013 (local time): 3eriwUfI

 

(2)登陆Mysql

 

[root@oracle11 ~]#mysql -u root -p

 

Enter password:

 

Welcome to the MySQLmonitor.  Commands end with ; or /g.

 

Your MySQLconnection id is 3

 

Server version:5.6.14-enterprise-commercial-advanced

 

 

 

Copyright (c) 2000,2013, Oracle and/or its affiliates. All rights reserved.

 

 

 

Oracle is aregistered trademark of Oracle Corporation and/or its

 

affiliates. Othernames may be trademarks of their respective

 

owners.

 

 

 

Type 'help;' or '/h'for help. Type '/c' to clear the current input statement.

 

 

 

mysql>

 

(3)修改密码

 

mysql> setpassword for 'root'@'localhost' = password ('root');

 

Query OK, 0 rowsaffected (0.05 sec)

 

当然也可以使用脚本 /usr/bin/mysql_secure_installation进行交互式的修改mysql的root密码,如下:

 

[root@oracle11 ~]# /usr/bin/mysql_secure_installation

 

 

 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL

      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

 

In order to log into MySQL to secure it, we'll need the current

password for the root user.  If you've just installed MySQL, and

you haven't set the root password yet, the password will be blank,

so you should just press enter here.

 

Enter current password for root (enter for none): 

OK, successfully used password, moving on...

 

Setting the root password ensures that nobody can log into the MySQL

root user without the proper authorisation.

 

Set root password? [Y/n] y

New password: 

Re-enter new password: 

Password updated successfully!

Reloading privilege tables..

 ... Success!

 

 

By default, a MySQL installation has an anonymous user, allowing anyone

to log into MySQL without having to have a user account created for

them.  This is intended only for testing, and to make the installation

go a bit smoother.  You should remove them before moving into a

production environment.

 

Remove anonymous users? [Y/n] n

 ... skipping.

 

Normally, root should only be allowed to connect from 'localhost'.  This

ensures that someone cannot guess at the root password from the network.

 

Disallow root login remotely? [Y/n] n

 ... skipping.

 

By default, MySQL comes with a database named 'test' that anyone can

access.  This is also intended only for testing, and should be removed

before moving into a production environment.

 

Remove test database and access to it? [Y/n] n

 ... skipping.

 

Reloading the privilege tables will ensure that all changes made so far

will take effect immediately.

 

Reload privilege tables now? [Y/n] n

 ... skipping.

 

 

 

 

All done!  If you've completed all of the above steps, your MySQL

installation should now be secure.

 

Thanks for using MySQL!

 

 

Cleaning up...

 

 

bitsCN.com
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 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

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

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

LARAVEL 소개 예 LARAVEL 소개 예 Apr 18, 2025 pm 12:45 PM

Laravel은 웹 응용 프로그램을 쉽게 구축하기위한 PHP 프레임 워크입니다. 설치 : Composer를 사용하여 전 세계적으로 Laravel CLI를 설치하고 프로젝트 디렉토리에서 응용 프로그램을 작성하는 등 다양한 기능을 제공합니다. 라우팅 : Routes/Web.php에서 URL과 핸들러 간의 관계를 정의하십시오. 보기 : 리소스/뷰에서보기를 작성하여 응용 프로그램의 인터페이스를 렌더링합니다. 데이터베이스 통합 : MySQL과 같은 데이터베이스와 상자 외 통합을 제공하고 마이그레이션을 사용하여 테이블을 작성하고 수정합니다. 모델 및 컨트롤러 : 모델은 데이터베이스 엔티티를 나타내고 컨트롤러는 HTTP 요청을 처리합니다.

MySQL 및 Phpmyadmin : 핵심 기능 및 기능 MySQL 및 Phpmyadmin : 핵심 기능 및 기능 Apr 22, 2025 am 12:12 AM

MySQL 및 Phpmyadmin은 강력한 데이터베이스 관리 도구입니다. 1) MySQL은 데이터베이스 및 테이블을 작성하고 DML 및 SQL 쿼리를 실행하는 데 사용됩니다. 2) PHPMYADMIN은 데이터베이스 관리, 테이블 구조 관리, 데이터 운영 및 사용자 권한 관리에 직관적 인 인터페이스를 제공합니다.

MySQL 대 기타 프로그래밍 언어 : 비교 MySQL 대 기타 프로그래밍 언어 : 비교 Apr 19, 2025 am 12:22 AM

다른 프로그래밍 언어와 비교할 때 MySQL은 주로 데이터를 저장하고 관리하는 데 사용되는 반면 Python, Java 및 C와 같은 다른 언어는 논리적 처리 및 응용 프로그램 개발에 사용됩니다. MySQL은 데이터 관리 요구에 적합한 고성능, 확장 성 및 크로스 플랫폼 지원으로 유명하며 다른 언어는 데이터 분석, 엔터프라이즈 애플리케이션 및 시스템 프로그래밍과 같은 해당 분야에서 이점이 있습니다.

Laravel 프레임 워크 설치 방법 Laravel 프레임 워크 설치 방법 Apr 18, 2025 pm 12:54 PM

기사 요약 :이 기사는 Laravel 프레임 워크를 쉽게 설치하는 방법에 대한 독자들을 안내하기위한 자세한 단계별 지침을 제공합니다. Laravel은 웹 애플리케이션의 개발 프로세스를 가속화하는 강력한 PHP 프레임 워크입니다. 이 자습서는 시스템 요구 사항에서 데이터베이스 구성 및 라우팅 설정에 이르기까지 설치 프로세스를 다룹니다. 이러한 단계를 수행함으로써 독자들은 라벨 프로젝트를위한 탄탄한 토대를 빠르고 효율적으로 놓을 수 있습니다.

비즈니스 세계에서 오라클의 역할 비즈니스 세계에서 오라클의 역할 Apr 23, 2025 am 12:01 AM

Oracle은 데이터베이스 회사 일뿐 만 아니라 클라우드 컴퓨팅 및 ERP 시스템의 리더이기도합니다. 1. Oracle은 데이터베이스에서 클라우드 서비스 및 ERP 시스템에 이르기까지 포괄적 인 솔루션을 제공합니다. 2. OracleCloud는 AWS와 Azure에 도전하여 IAA, PAAS 및 SAAS 서비스를 제공합니다. 3. E-BusinessSuite 및 FusionApplications와 같은 Oracle의 ERP 시스템은 기업이 운영을 최적화하는 데 도움이됩니다.

Mongodb vs. Oracle : 필요에 맞는 올바른 데이터베이스 선택 Mongodb vs. Oracle : 필요에 맞는 올바른 데이터베이스 선택 Apr 22, 2025 am 12:10 AM

MongoDB는 구조화되지 않은 데이터 및 높은 확장 성 요구 사항에 적합한 반면 Oracle은 엄격한 데이터 일관성이 필요한 시나리오에 적합합니다. 1. MongoDB는 소셜 미디어 및 사물 인터넷에 적합한 다양한 구조물에 데이터를 유연하게 저장합니다. 2. Oracle 구조화 된 데이터 모델은 데이터 무결성을 보장하고 금융 거래에 적합합니다. 3. MongoDB는 파편을 통해 수평으로 비늘을, RAC를 통해 수직으로 오라클 스케일링됩니다. 4. MongoDB는 유지 보수 비용이 낮지 만 Oracle은 유지 보수 비용이 높지만 완전히 지원됩니다.

MySQL에서 외국 키의 목적을 설명하십시오. MySQL에서 외국 키의 목적을 설명하십시오. Apr 25, 2025 am 12:17 AM

MySQL에서 외국 키의 기능은 테이블 간의 관계를 설정하고 데이터의 일관성과 무결성을 보장하는 것입니다. 외국 키는 참조 무결성 검사 및 계단식 작업을 통해 데이터의 효과를 유지합니다. 성능 최적화에주의를 기울이고 사용할 때 일반적인 오류를 피하십시오.

MySQL 및 Mariadb를 비교하고 대조하십시오. MySQL 및 Mariadb를 비교하고 대조하십시오. Apr 26, 2025 am 12:08 AM

MySQL과 Mariadb의 주요 차이점은 성능, 기능 및 라이센스입니다. 1. MySQL은 Oracle에 의해 개발되었으며 Mariadb는 포크입니다. 2. MariaDB는 높은 하중 환경에서 더 나은 성능을 발휘할 수 있습니다. 3. Mariadb는 더 많은 스토리지 엔진과 기능을 제공합니다. 4.MySQL은 듀얼 라이센스를 채택하고 MariaDB는 완전히 오픈 소스입니다. 선택할 때 기존 인프라, 성능 요구 사항, 기능 요구 사항 및 라이센스 비용을 고려해야합니다.

See all articles