ãWSL2ã§ã¯PID 1ãinitdåé¡ã«ãã£ã¦systemdãèµ·åã§ãã¾ããã ãã®ãããsystemctlã使ããªãã¦MySQLãèµ·åã§ããªãã£ã¦ãªãã®ã§ãããyoku0825ããã«ããæ¹ãæãã¦ããã£ãã®ã§ã¡ã¢ã¨ãã¦æ®ãã¾ãã
ãããªã ãºããªãã§ããæè¿ã®mysqldã«ã¯--daemonizeãããã®ã§ããã使ãã°okã§ã
— yoku0825 (@yoku0825) 2021å¹´8æ2æ¥
ãã¤ã¾ãroot権é㧠mysqld --daemonize
ãå©ãã°OKã
ãã /var/run
é
ä¸ã¯åèµ·åæã« /var/run/mysqld/
ããªãã¦å¤±æããã¨æãã®ã§èµ·åã¯ãã©ã«ããä½ã£ã¦æ¨©éãä»ãã¦ããã¾ãããã
$ mkdir /var/run/mysqld $ chown mysql:mysql: /var/run/mysqld $ mysqld --daemonize
ãããã§MySQLããã¤ãã©ããèµ·åãã¾ãã yoku0825ããã¯MySQLã®ãã¨ããªãã§ãç¥ã£ã¦ã¦ä¾¿å©ã
2021/09/12 追è¨
rootã§ãããã¨
— yoku0825 (@yoku0825) 2021å¹´9æ12æ¥
2021-09-12T09:05:51.031408Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
ã£ã¦æããã¾ããï¼ (my.cnfã«
[mysqld]
user=mysql
ã£ã¦æ¸ãã¦ããã°æããã¾ããã
åã®mysqld.confãåæç¶æ ã§
— ãã¼ã ã@å代ALF (@soudai1025) 2021å¹´9æ12æ¥
user = mysql
ã£ã¦æ¸ãã¦ããã®ã§åæç¶æ ã ã¨æãããªãã£ã½ãã
èªåã®ç§ä¼ã®ã¿ã¬my.cnf使ãã¨ãã¯æ°ãã¤ãã¾ãããã