Install MySQL 5.7 at Cloud9 Workspace
To install MySQL 5.7 at a Cloud9 PHP Workspace, you can use the following commands:
Get mysql-apt-config
wget https://dev.mysql.com/get/mysql-apt-config_0.8.7-1_all.deb
Notice: You may find a newer file here: https://dev.mysql.com/downloads/repo/apt/
Install mysql-apt-config
sudo dpkg -i mysql-apt-config_0.8.7-1_all.deb
Important: Select MySQL 5.7 within the wizard
Update apt and Install MySQL 5.7
sudo apt-get update
sudo apt-get install mysql-server
Run Upgrade Script
sudo mysql_upgrade -u root -p --force --upgrade-system-tables
Notice: Password is empty
Rename root user
Open mysql client:
mysql -u root -p
Notice: Password is empty
UPDATE mysql.user set user = "YOUR_USERNAME" where user = "root";
flush privileges;
exit
Restart Database
sudo service mysql restart
Check Version
mysql-ctl cli
Then execute:
SELECT VERSION();
Should return something like that:
+-----------+
| VERSION() |
+-----------+
| 5.7.19 |
+-----------+
1 row in set (0.00 sec)