[原]MySQL 5.7.4 for Red Hat Enterprise 7(RHEL7)的安装
远观历史, MySQL的主要目的是为了能够在单处理器核心的商业服务器上运行。如今MySQL的一个变化用户可能不会注意到,那就是甲骨文已经开始重新架构MySQL的代码,使它大量的模块化。如软件解析器,优化和复制功能以模块化的形式被重写。
该版本的查询性能得以大幅提升,比 MySQL 5.6 提升 1 倍,新版本的 MySQL 在测试平台上可达到每秒 512000 只读 QPS,而 MySQL 5.6 最高只能到 250000 QPS。该性能的提升是通过其 Memcached 插件实现的。同时该版本在数据库其他方面也得到不少改进,例如降低了建立数据库连接的时间,此举得益于 Facebook 的贡献。
相关mysql视频教程推荐:《mysql教程》
1.首先我们了解MySQL的特性
MySQL的特性
使用C和C++编写,并使用了多种编译器进行测试,保证源代码的可移植性。
支持AIX、BSDi、FreeBSD、HP-UX、Linux、Mac OS、Novell Netware、NetBSD、OpenBSD、OS/2 Wrap、Solaris、SunOS、Windows等多种操作系统。
为多种编程语言提供了API。这些编程语言包括C、C++、C#、Delphi、Eiffel、Java、Perl、PHP、Python、Ruby和Tcl等。
支持多线程,充分利用CPU资源,支持多用户。
优化的SQL查询算法,有效地提高查询速度。
既能够作为一个单独的应用程序应用在客户端服务器网络环境中,也能够作为一个库而嵌入到其他的软件中。
提供多语言支持,常见的编码如中文的GB 2312、BIG5,日文的Shift_JIS等都可以用作数据表名和数据列名。
提供TCP/IP、ODBC和JDBC等多种数据库连接途径。
提供用于管理、检查、优化数据库操作的管理工具。
可以处理拥有上千万条记录的大型数据库。
中文 MySQL 文档:http://tool.oschina.net/apidocs/apidoc?api=mysql-5.1-zh
英文 MySQL 文档:http://tool.oschina.net/apidocs/apidoc?api=mysql-5.5-en
2.下面我们开始下载MySQL
打开 http://dev.mysql.com/downloads/mysql/ 选择开发者版本
选择RHEL的版本
下载你需要的对应的x86架构的 32或者64位的mysql的版本 点击下载
选择现在下载 或者下载工具打开
http://cdn.mysql.com/Downloads/MySQL-5.7/MySQL-5.7.4-m14-0.2.m14.el7.x86_64.rpm-bundle.tar
3.将MySQL传送进虚拟机里面
启动RHEL7 我们需要用root用户安装 为了更加直接我们直接用root登陆
4.释放安装包: tar -xvf MySQL-5.7.4-m14-0.2.m14.el7.x86_64.rpm-bundle.tar
5.下面开始安装
显示出有冲突 我应该卸载掉原有的软件mariadb-devel 和 mariadb
rpm -e --nodeps mariadb-libs-5.5.33a-3.el7.x86_64 rpm -ivh mysql-community-common-5.7.4-0.2.m14.el7.x86_64.rpm rpm -ivh mysql-community-libs-5.7.4-0.2.m14.el7.x86_64.rpm rpm -ivh mysql-community-embedded-5.7.4-0.2.m14.el7.x86_64.rpm
rpm -e mariadb-devel –nodeps
rpm -e mariadb –nodeps rpm -ivh mysql-community-devel-5.7.4-0.2.m14.el7.x86_64.rpm rpm -ivh mysql-community-embedded-devel-5.7.4-0.2.m14.el7.x86_64.rpm rpm -ivh mysql-community-client-5.7.4-0.2.m14.el7.x86_64.rpm
在虚拟机的光驱上挂载上你的镜像
进入iso文件 安装好几个依赖包
rpm -ivh perl-Net-Daemon-0.48-4.el7.noarch.rpm rpm -ivh perl-PlRPC-0.2020-12.el7.noarch.rpm rpm -ivh perl-DBI-1.627-1.el7.x86_64.rpm
工作路径返回到桌面 然后继续安装我们的server
rpm -ivh mysql-community-server-5.7.4-0.2.m14.el7.x86_64.rpm
6.更改用户密码
Server安装完了 我们就查找一下秘钥文件
find / -name .mysql_secret
登陆mysql的时候用root用户被拒绝访问了 所以我们切换用户
再次登陆
更换密码成一个简单一点的 示例中为123456

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

Apache connects to a database requires the following steps: Install the database driver. Configure the web.xml file to create a connection pool. Create a JDBC data source and specify the connection settings. Use the JDBC API to access the database from Java code, including getting connections, creating statements, binding parameters, executing queries or updates, and processing results.

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

The key to installing MySQL elegantly is to add the official MySQL repository. The specific steps are as follows: Download the MySQL official GPG key to prevent phishing attacks. Add MySQL repository file: rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Update yum repository cache: yum update installation MySQL: yum install mysql-server startup MySQL service: systemctl start mysqld set up booting

Laravel is a PHP framework for easy building of web applications. It provides a range of powerful features including: Installation: Install the Laravel CLI globally with Composer and create applications in the project directory. Routing: Define the relationship between the URL and the handler in routes/web.php. View: Create a view in resources/views to render the application's interface. Database Integration: Provides out-of-the-box integration with databases such as MySQL and uses migration to create and modify tables. Model and Controller: The model represents the database entity and the controller processes HTTP requests.
