You should keep the following issues and notes in mind:您应该牢记以下问题和注意事项:
Other MySQL installations其他MySQL安装: The installation procedure does not recognize MySQL installations by package managers such as Homebrew. The installation and upgrade process is for MySQL packages provided by us. If other installations are present, then consider stopping them before executing this installer to avoid port conflicts.:安装过程无法识别包管理器(如Homebrew)安装的MySQL。安装和升级过程是针对我们提供的MySQL包。如果有其他安装,请考虑在执行此安装程序之前停止安装,以避免端口冲突。
Homebrew: For example, if you installed MySQL Server using Homebrew to its default location then the MySQL installer installs to a different location and won't upgrade the version from Homebrew. :例如,如果您使用Homebrew将MySQL Server安装到其默认位置,则MySQL安装程序将安装到其他位置,并且不会从Homebrew升级版本。In this scenario you would end up with multiple MySQL installations that, by default, attempt to use the same ports. 在这种情况下,您最终会安装多个MySQL,默认情况下,这些MySQL会尝试使用相同的端口。Stop the other MySQL Server instances before running this installer, such as executing brew services stop mysql to stop the Homebrew's MySQL service.在运行此安装程序之前,请停止其他MySQL Server实例,例如执行brew services stop mysql
以停止Homebrew的MySQL服务。
Launchd: A launchd daemon is installed that alters MySQL configuration options. :安装了一个launchd守护程序,用于更改MySQL的配置选项。Consider editing it if needed, see the documentation below for additional information. 如果需要,请考虑对其进行编辑,有关其他信息,请参阅下面的文档。Also, macOS 10.10 removed startup item support in favor of launchd daemons. 此外,macOS 10.10删除了启动项支持,转而支持launchd守护进程。The optional MySQL preference pane under macOS System Preferences uses the launchd daemon.macOS“系统首选项”下的可选MySQL首选项窗格使用launchd守护进程。
Users: You may need (or want) to create a specific mysql
user to own the MySQL directory and data. You can do this through the Directory Utility, and the mysql
user should already exist. For use in single user mode, an entry for _mysql
(note the underscore prefix) should already exist within the system /etc/passwd
file.
Data: Because the MySQL package installer installs the MySQL contents into a version and platform specific directory, you can use this to upgrade and migrate your database between versions. You need either to copy the data
directory from the old version to the new version, or to specify an alternative datadir
value to set location of the data directory. By default, the MySQL directories are installed under /usr/local/
.
Aliases: You might want to add aliases to your shell's resource file to make it easier to access commonly used programs such as mysql and mysqladmin from the command line. The syntax for bash is:
alias mysql=/usr/local/mysql/bin/mysql alias mysqladmin=/usr/local/mysql/bin/mysqladmin
For tcsh, use:
alias mysql /usr/local/mysql/bin/mysql alias mysqladmin /usr/local/mysql/bin/mysqladmin
Even better, add /usr/local/mysql/bin
to your PATH
environment variable. You can do this by modifying the appropriate startup file for your shell. For more information, see Section 4.2.1, “Invoking MySQL Programs”.
Removing: After you have copied over the MySQL database files from the previous installation and have successfully started the new server, you should consider removing the old installation files to save disk space. Additionally, you should also remove older versions of the Package Receipt directories located in /Library/Receipts/mysql-
.VERSION
.pkg