所以我有一个更新的macOS-macOS Mojave 10.14.1。我已安装的mysql版本是5.6-很遗憾,我无法升级(试图运行我们的公司应用,并且我们的文件语法停留在5.6中,而不会在5.7中运行)。我使用自制软件安装。
当我运行mysql.server start时-出现以下错误:
Starting MySQL
. ERROR! The server quit without updating PID file
(/usr/local/var/mysql/Cecilles-MacBook-Pro.local.pid).
我读了很多书,这是一个权限问题,所以我去确保用户设置为mysql而不是root或我。
➜ support-files ls -la
total 64
drwxr-xr-x 8 _mysql staff 256 Nov 8 13:11 .
drwxr-xr-x 19 _mysql staff 608 Nov 9 09:44 ..
-rwxr-xr-x 1 _mysql staff 1153 Sep 10 03:23 binary-configure
-rw-r--r-- 1 _mysql staff 773 Sep 10 03:23 magic
-rw-r--r-- 1 _mysql staff 1105 Nov 8 13:28 my-default.cnf
-rwxr-xr-x 1 _mysql staff 946 Nov 8 13:11 mysql-log-rotate
-rwxr-xr-x 1 _mysql staff 10678 Nov 8 13:11 mysql.server
-rwxr-xr-x 1 _mysql staff 1061 Nov 8 13:11 mysqld_multi.server
查看mysql.server是否只是一个符号链接-确实是。
➜ support-files which mysql.server
/usr/local/opt/mysql@5.6/bin/mysql.server
所以我去那里更改任何必要的权限。
➜ bin ls -la
total 253368
drwxr-xr-x 46 _mysql staff 1472 Nov 8 13:11 .
drwxr-xr-x 19 _mysql staff 608 Nov 9 09:44 ..
-r-xr-xr-x 1 _mysql staff 3185296 Nov 8 13:11 innochecksum
-r-xr-xr-x 1 _mysql staff 1569 Nov 8 13:11 msql2mysql
-r-xr-xr-x 1 _mysql staff 3180344 Nov 8 13:11 my_print_defaults
-r-xr-xr-x 1 _mysql staff 3425124 Nov 8 13:11 myisam_ftdump
-r-xr-xr-x 1 _mysql staff 3519928 Nov 8 13:11 myisamchk
-r-xr-xr-x 1 _mysql staff 3402280 Sep 10 03:23 myisamlog
-r-xr-xr-x 1 _mysql staff 3443204 Nov 8 13:11 myisampack
-r-xr-xr-x 1 _mysql staff 3470344 Nov 8 13:11 mysql
lrwxr-xr-x 1 _mysql staff 29 Sep 10 03:23 mysql.server ->
../support-files/mysql.server
-r-xr-xr-x 1 _mysql staff 3761480 Nov 8 13:11 mysql_client_test
-r-xr-xr-x 1 _mysql staff 11384760 Nov 8 13:11
mysql_client_test_embedded
-r-xr-xr-x 1 _mysql staff 6556 Nov 8 13:11 mysql_config
-r-xr-xr-x 1 _mysql staff 3374832 Nov 8 13:11 mysql_config_editor
-r-xr-xr-x 1 _mysql staff 4299 Sep 10 03:23
mysql_convert_table_format
-r-xr-xr-x 1 _mysql staff 11080428 Nov 8 13:11 mysql_embedded
-r-xr-xr-x 1 _mysql staff 3374 Sep 10 03:23 mysql_find_rows
-r-xr-xr-x 1 _mysql staff 1331 Sep 10 03:23
mysql_fix_extensions
lrwxr-xr-x 1 _mysql staff 27 Sep 10 03:23 mysql_install_db ->
../scripts/mysql_install_db
-r-xr-xr-x 1 _mysql staff 3189504 Nov 8 13:11 mysql_plugin
-r-xr-xr-x 1 _mysql staff 10106 Sep 10 03:23
mysql_secure_installation
-r-xr-xr-x 1 _mysql staff 17550 Sep 10 03:23 mysql_setpermission
-r-xr-xr-x 1 _mysql staff 3147136 Nov 8 13:11 mysql_tzinfo_to_sql
-r-xr-xr-x 1 _mysql staff 3484512 Nov 8 13:11 mysql_upgrade
-r-xr-xr-x 1 _mysql staff 3180128 Nov 8 13:11 mysql_waitpid
-r-xr-xr-x 1 _mysql staff 3942 Sep 10 03:23 mysql_zap
-r-xr-xr-x 1 _mysql staff 3378320 Nov 8 13:11 mysqladmin
-r-xr-xr-x 1 _mysql staff 3547660 Nov 8 13:11 mysqlbinlog
-r-xr-xr-x 1 _mysql staff 10928 Nov 8 13:11 mysqlbug
-r-xr-xr-x 1 _mysql staff 3373696 Nov 8 13:11 mysqlcheck
-r-xr-xr-x 1 _mysql staff 11766608 Nov 8 13:11 mysqld
-r-xr-xr-x 1 _mysql staff 27015 Nov 8 13:11 mysqld_multi
-r-xr-xr-x 1 _mysql staff 27430 Nov 8 13:11 mysqld_safe
-r-xr-xr-x 1 _mysql staff 3435992 Nov 8 13:11 mysqldump
-r-xr-xr-x 1 _mysql staff 7424 Sep 10 03:23 mysqldumpslow
-r-xr-xr-x 1 _mysql staff 34938 Sep 10 03:23 mysqlhotcopy
-r-xr-xr-x 1 _mysql staff 3370296 Nov 8 13:11 mysqlimport
-r-xr-xr-x 1 _mysql staff 3368808 Nov 8 13:11 mysqlshow
-r-xr-xr-x 1 _mysql staff 3385220 Nov 8 13:11 mysqlslap
-r-xr-xr-x 1 _mysql staff 3618408 Nov 8 13:11 mysqltest
-r-xr-xr-x 1 _mysql staff 11203720 Nov 8 13:11 mysqltest_embedded
-r-xr-xr-x 1 _mysql staff 3284632 Nov 8 13:11 perror
-r-xr-xr-x 1 _mysql staff 3157072 Sep 10 03:23 replace
-r-xr-xr-x 1 _mysql staff 3187036 Nov 8 13:11 resolve_stack_dump
-r-xr-xr-x 1 _mysql staff 3180348 Nov 8 13:11 resolveip
我运行mysql.server start并且仍然没有骰子。我很确定由于权限问题而没有创建PID文件,但是目前,我还不确定要更改权限/所有者的其他条件。
任何反馈将不胜感激,谢谢!