在 Solaris 上安装 MySQL

2023年 8月 27日 43.9k 0

在 Solaris 上安装 MySQL

shell> gunzip mysql-8.0.25-solaris11-x86_64.pkg.gz

安装新软件包

如果需要安装新软件包,则需要使用“pkgadd”选项,并按照屏幕上的提示进行操作。

此外,用户必须具有root权限才能执行此操作。

shell> pkgadd -d mysql-8.0.25-solaris11-x86_64.pkg
The following packages are available:
1 mysql MySQL Community Server (GPL)
(i86pc) 8.0.25
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

登录后复制

The PKG installer installs all the files and tools that are needed, and initializes the database as well (if it doesn’t exist).

To complete the installation, the root password for MySQL has to be set based on the instructions provided at the end of the installation. Otherwise, there is another way to do this- The ‘mysql_secure_installation’ script has to be run, which comes with the installation.

By default, the PKG package installs MySQL under the root path, i.e /opt/mysql. The installation root path can be changed only if ‘pkgadd’ is used. This can be used to install MySQL in a different zone of Solaris.

Safe startup and shutdown

If MySQL needs to be automatically enabled during startup and closed when the system is shut down, a link needs to be created between this file and the ‘init’ script directories.

To ensure safe startup and shutdown of MySQL, the below commands can be added to the correct links.

shell> ln /etc/init.d/mysql /etc/rc3.d/S91mysql
shell> ln /etc/init.d/mysql /etc/rc0.d/K02mysql

登录后复制

如果需要升级Solaris软件包文件格式,则在安装更新的软件包之前需要删除现有的软件包安装。当删除软件包时,它不会删除数据库上的现有信息。它只会删除服务器、二进制文件和支持文件。

以上就是在 Solaris 上安装 MySQL的详细内容,更多请关注每日运维网(www.mryunwei.com)其它相关文章!

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论