当前位置:Gxlcms > mysql > MAC系统中添加MYSQL开机启动的方法

MAC系统中添加MYSQL开机启动的方法

时间:2021-07-01 10:21:17 帮助过:20人阅读

1.添加文件 touch /Library/LaunchDaemons/com.mysql.mysql.plist 2.添加内容 xml version="1.0" encoding="UTF-8" !DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd" plist version="1.0" dict keyKe

1.添加文件


touch
/Library/LaunchDaemons/com.mysql.mysql.plist


2.添加内容


<?xml version="1.0" encoding="UTF-8"?>



KeepAlive

Label
com.mysql.mysqld
ProgramArguments

/usr/local/mysql/bin/mysqld_safe
--user=root




3.添加后重启


sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist

人气教程排行