Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

Sorry but how to start a mysql service #22

Closed
zfk513 opened this issue Nov 6, 2019 · 16 comments
Closed

Sorry but how to start a mysql service #22

zfk513 opened this issue Nov 6, 2019 · 16 comments
Labels
need-repro question Further information is requested

Comments

@zfk513
Copy link

zfk513 commented Nov 6, 2019

image
I already #issue WSL repleaceService using systemctl
But all failed ,could you help?thx a lot ? ありがとうございます

@yuk7
Copy link
Collaborator

yuk7 commented Nov 6, 2019

Which mysql version are you using?
If you use Mysql 8.0 or later,I think this isssue may be related.

@zfk513
Copy link
Author

zfk513 commented Nov 6, 2019

well just 5.7

@yuk7
Copy link
Collaborator

yuk7 commented Nov 6, 2019

Ok.
Can you excute mysqld command?
You can see a detailed log.

@zfk513
Copy link
Author

zfk513 commented Nov 6, 2019

image
I think the problem is i still cannot get a service

@yuk7
Copy link
Collaborator

yuk7 commented Nov 6, 2019

Yes,mysqld is mysql daemon executable,it provides mysql server service.
Since an execution user error has occurred, try switching to the mysql user and retry it.

su mysql
mysqld

@zfk513
Copy link
Author

zfk513 commented Nov 6, 2019

image
the same,i decide try Vmare now ,thx a lot

@zfk513
Copy link
Author

zfk513 commented Nov 6, 2019

Did you make initial settings including mysql_secure_installation?

Nope,i just install and try to start the service as other tutorial suggest,how to change ?

@zfk513
Copy link
Author

zfk513 commented Nov 6, 2019

image
the VMware ways works ,so far ,thank you for you attention

@yuk7
Copy link
Collaborator

yuk7 commented Nov 6, 2019

hmm... I did same,but it worked.

Env: Windows 10 1903
screenshot

@yuk7 yuk7 added need-repro question Further information is requested labels Nov 6, 2019
@zfk513
Copy link
Author

zfk513 commented Nov 6, 2019

how so,i just cann't ????

@yuk7
Copy link
Collaborator

yuk7 commented Nov 6, 2019

Can you read /var/log/journal/mysqld.service.log ?

@zfk513
Copy link
Author

zfk513 commented Nov 6, 2019

yeap
image

@yuk7
Copy link
Collaborator

yuk7 commented Nov 6, 2019

Ok... It seems crashed mysqld daemon.
Logs are stored elsewhere.
Please read /var/log/mysqld.log

@parveenhooda
Copy link

parveenhooda commented Nov 7, 2019

image

This is happening because /var/run is a volatile directory and somehow it is not able to find/create mysqld.pid file in /var/run/mysqld and hence it is failing. If it still doesn't work look for the logs at /var/logs/mysqld.log.

Also, you would have to do it every time you restart the LxssManager service or reboot the machine.

image

@mandaputtra
Copy link

mandaputtra commented Nov 10, 2019

@parveenhooda, @yuk7 what distro youre using? seems you can get your systemctl works, I can't get systemctl works on Ubuntu 18.04. Thanks

Edit : Sorry stupid me asking without even realize this was a CentOS WSL Repo

@yuk7
Copy link
Collaborator

yuk7 commented Nov 13, 2019

@mandaputtra
systemctl alternative script
Please see: microsoft/WSL#1579 (comment)

@yuk7 yuk7 closed this as completed Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need-repro question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants