每日一练 数据库linux安装
第一步:下载数据库
通过shell工具,采用xftp功能
https://img2022.cnblogs.com/blog/157814/202206/157814-20220612125926599-1033203541.png
第二步:解压数据包
mkdir mysql (在解压之前创建文件夹)
tar -xvf mysql-8.0.28-1.el8.x86_64.rpm-bundle.tar -C mysql
可以将解压的文件放入到mysql文件夹中
第三步:安装mysql
根据截图内容,发现安装过程中出现了此问题。
https://img2022.cnblogs.com/blog/157814/202206/157814-20220612125453678-130549335.png
缺少了一个步骤,需要先执行
yum install openssl-devel
然后在进行安装mysql相关的组件
-rw-r--r--. 1 root root 803604480 Jun 11 21:59 mysql-8.0.28-1.el8.x86_64.rpm-bundle.tar
-rw-r--r--. 1 7155 3141514696536 Dec 18 05:12 mysql-community-client-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 3141535757244 Dec 18 05:12 mysql-community-client-debuginfo-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 2525324 Dec 18 05:12 mysql-community-client-plugins-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 3059452 Dec 18 05:12 mysql-community-client-plugins-debuginfo-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 648016 Dec 18 05:12 mysql-community-common-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 3854428 Dec 18 05:12 mysql-community-debuginfo-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 3141522165576 Dec 18 05:12 mysql-community-debugsource-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 2277568 Dec 18 05:13 mysql-community-devel-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 2218888 Dec 18 05:13 mysql-community-icu-data-files-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 1565452 Dec 18 05:13 mysql-community-libs-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 3092836 Dec 18 05:13 mysql-community-libs-debuginfo-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 3141556040148 Dec 18 05:14 mysql-community-server-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 3141522887476 Dec 18 05:15 mysql-community-server-debug-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 102979324 Dec 18 05:15 mysql-community-server-debug-debuginfo-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 263295408 Dec 18 05:15 mysql-community-server-debuginfo-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 31415 242279956 Dec 18 05:16 mysql-community-test-8.0.28-1.el8.x86_64.rpm
-rw-r--r--. 1 7155 3141524238412 Dec 18 05:17 mysql-community-test-debuginfo-8.0.28-1.el8.x86_64.rpm
安装组件有先后顺序,请注意安装的次序。
rmp -ivh mysql-community-devel-8.0.28-1.el8.x86_64.rpm
https://img2022.cnblogs.com/blog/157814/202206/157814-20220612131841418-231612489.png
可以在rpm 后面加上--nodeps --force,即安装时不检查依赖关系。
1.安装devel的组件
rpm -ivh mysql-community-devel-8.0.28-1.el8.x86_64.rpm --nodeps --force 2.安装客户端和服务端组件
# rpm -ivh mysql-community-client-8.0.28-1.el8.x86_64.rpm --nodeps --force
warning: mysql-community-client-8.0.28-1.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing... #################################
Updating / installing...
1:mysql-community-client-8.0.28-1.e#################################
# rpm-ivh mysql-community-server-8.0.28-1.el8.x86_64.rpm --nodeps --force
warning: mysql-community-server-8.0.28-1.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing... #################################
Updating / installing...
1:mysql-community-server-8.0.28-1.e#################################
3. 然后根据需要安装相应的服务包
# rpm -ivh mysql-community-common-8.0.28-1.el8.x86_64.rpm --nodeps --force
warning: mysql-community-common-8.0.28-1.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing... #################################
Updating / installing...
1:mysql-community-common-8.0.28-1.e#################################
# rpm -ivh mysql-community-client-plugins-8.0.28-1.el8.x86_64.rpm--nodeps --force
warning: mysql-community-client-plugins-8.0.28-1.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing... #################################
Updating / installing...
1:mysql-community-client-plugins-8.#################################
# rpm -ivh mysql-community-libs-8.0.28-1.el8.x86_64.rpm --nodeps --force
warning: mysql-community-libs-8.0.28-1.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 3a79bd29: NOKEY
Preparing... #################################
Updating / installing...
1:mysql-community-libs-8.0.28-1.el8################################# 安装完成以后,可以启动MYSQL服务器。
第四步:启动MYSQL
systemctl start mysqld
mysql -u root -p
没有指定密码,会随机指定密码,可以通过vim /var/log/mysqld.log
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页:
[1]