-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL won't start (error connecting) #1399
Comments
Having the same problem since the Ubuntu 20.04 upgrade. |
Many thanks for reporting this. I'm not sure exactly what causes the problem, but it's likely due to the upgrade to MySQL 8 (side-effect of the Ubuntu 20.04 upgrade). I'll try to find what exactly is incompatible with MySQL 8 in our default MySQL configuration: https://github.com/gitpod-io/workspace-images/tree/master/mysql and then fix it. |
Also, it seems that @lechien73 was able to fix / work around this problem in this msyql.cnf by removing a few config parameters: diff --git a/mysql/mysql.cnf b/mysql/mysql.cnf
index b656494..3762ea9 100644
--- a/mysql/mysql.cnf
+++ b/mysql/mysql.cnf
@@ -12,7 +12,6 @@ datadir = /workspace/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
-bind-address = 127.0.0.1
key_buffer_size = 16M
max_allowed_packet = 16M
@@ -20,12 +19,7 @@ thread_stack = 192K
thread_cache_size = 8
myisam-recover-options = BACKUP
-query_cache_limit = 1M
-query_cache_size = 16M
general_log_file = /var/log/mysql/mysql.log
general_log = 1
log_error = /var/log/mysql/error.log
-
-expire_logs_days = 10
-max_binlog_size = 100M Maybe we could try removing some of these as well. I'm not even sure why we have them to be honest. |
The MySQL 8 configuration originally proposed by @eryjus in https://github.com/gitpod-io/workspace-images/pull/100/files#diff-f8507bef6331e741bc1ebaf18bcfab35 has similar notable differences: diff --git a/mysql/mysql.cnf b/mysql/mysql.cnf
index b656494..e81be0b 100644
--- a/mysql/mysql.cnf
+++ b/mysql/mysql.cnf
@@ -11,6 +11,7 @@ basedir = /usr
datadir = /workspace/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
+lc-messages = en_US
skip-external-locking
bind-address = 127.0.0.1
@@ -20,12 +21,7 @@ thread_stack = 192K
thread_cache_size = 8
myisam-recover-options = BACKUP
-query_cache_limit = 1M
-query_cache_size = 16M
general_log_file = /var/log/mysql/mysql.log
general_log = 1
log_error = /var/log/mysql/error.log
-
-expire_logs_days = 10
-max_binlog_size = 100M |
I guess we'll remove |
The error log specifically showed |
I've just merged the fix to deploy a new (No need to wait for CI on the PR, because Gitpod's MySQL image is already broken, and I'm pretty confident that this change can fix it.) Thanks a lot for your help @lechien73 @kunxin-chor and @eryjus! 🙏 |
Describe the bug
mysql -u -root
won't workSteps to reproduce
mysql -u root
Expected behavior
MySQL command line to show up
Additional information
Example repository
https://github.com/kunxin-chor/gitpod-mysql-trial2
The text was updated successfully, but these errors were encountered: