Using:
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)
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.
But, If I use terminal: mysql -u username -p database_name < file.sql
data imports fine, I can then use Workbench to edit the database no problem.
But, If I then try to export the database, I run into the same problem, but I can export via the terminal.
I am using the root user, with the correct password in each case.
Any pointers would be very gratefully received.. I am stumped!
thank you
You appear to be connecting to localhost
so I would assume that mysqlworkbench is trying to lookup a domain socket in a wrong place. Try to switch to a tcp/ip connection by explicitly setting 127.0.0.1
instead of localhost
https://dev.mysql.com/doc/refman/5.5/en/connecting.html#option_general_socket
For connections to localhost, MySQL programs attempt to connect to the local server by using a Unix socket file. To ensure that the client makes a TCP/IP connection to the local server, use --host or -h to specify a host name value of 127.0.0.1, or the IP address or name of the local server
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments