Last answered:

17 Nov 2022

Posted on:

19 Jul 2022

0

Lost connection to MySQL server/DBMS connection is not available

Hello,
For some reason, I am not able to perform any queries in the MySQL workbench.  This happened after I uploaded the 'employee_mod' and tried to solve Tasks. I keep getting lost connection to MySQL Server. It works every time I restart the MySQL service but then comes to the same error after I perform more queries. I also get the imageerror 'DBMS connection is not available. Any help?

3 answers ( 0 marked as helpful)
Instructor
Posted on:

19 Jul 2022

0

Hi Eugene!
Thanks for reaching out.

You can try changing the DBMS connection read timeout interval (in seconds) setting in the SQL Editor tab in the Workbench's preferences. Change it to something like 180. Then restart the Workbench or reconnect to the DBMS and rerun the query.

Hope this helps.
Best,
Tsvetelin

Posted on:

19 Jul 2022

0

Hi Tsvetelin Tsonkov,
Thank you for your response. However, after changing the DBMS connection read timeout interval to 180, I was able to perform only two queries and then the error again. image

Posted on:

17 Nov 2022

0

select
e.gender, d.dept_name, round(avg(s.salary),2) as salary, year(s.from_date) as calendar_year
from
t_salaries s
join
    t_employees e ON s.emp_no = e.emp_no
join
t_dept_emp de ON de.emp_no = e.emp_no
join
t_departments d ON d.dept_no = de.dept_no
group by d.dept_no, e.gender, calendar_year
having calendar_year <= 2002
order by d.dept_no;

Submit an answer