Cannot Install / Use MySQL on Amazon Cloud9 Free A

2019-08-21 10:50发布

问题:

I'm trying to run MySQL commands on a free account with Amazon Cloud9 and I cannot get it to work anyhow. I've tried all the commands I've found on the internet, including mysql-ctl install, mysql-ctl start and mysql-ctl cli - all of them result in a discouraging bash: mysql-ctl: command not found.

I think Amazon Cloud9 may have changed their rules regarding free accounts. Please, advise what to do.

回答1:

These are the commands that you need. Write them to terminal.

sudo service mysqld start
sudo mysql_secure_installation

To run MySQL Shell:

mysql -uroot -p

To stop the service:

sudo service mysqld stop