title: MySQL Workbench import/export: ERROR 2003 (HY000): Can't Connect to MySQL server on 'localhost' (110)
body: <p>Using:</p>
  
  <ul>
  <li>Ubuntu 16.04 LTS.</li>
  <li>MySQL 5.7.17</li>
  <li>MySQL Workbench 6.3</li>
  </ul>
  
  <p>In MySQL Workbench I can connect to my local instance, create a new database and edit this database.
  But, if i try to import an sql file I am getting the following error:
  ERROR 2003 (HY000): Can't Connect to MySQL server on 'localhost' (110)</p>
  
  <p>It does not matter the size of the sql file - even a simple create table and one column with no data causes the same error.</p>
  
  <p>But, If I use terminal:
  mysql -u username -p database_name &lt; file.sql</p>
  
  <p>data imports fine, I can then use Workbench to edit the database no problem.</p>
  
  <p>But, If I then try to export the database, I run into the same problem, but I can export via the terminal.</p>
  
  <p>I am using the root user, with the correct password in each case.</p>
  
  <p>Any pointers would be very gratefully received.. I am stumped!</p>
  
  <p>thank you</p>