How to reconfigure MySQL in Ubuntu

Asked by bill purvis on 2008-09-12

I have MySQL up and running fine on one of my machines. When I try to connect from
another machine I get the error:

ERROR 2003 (HY000): Can't connect to MySQL server on 'arvo' (111)

After digging in the MySQL documentation I discovered that it was configured
to use:
socket = /var/run/mysqld/mysqld.sock

I found the config file in /etc/mysql/debian.cnf but this says that it is
automatically configured. How can I change the config safely to allow it
to listen on tcp/ip to local hosts?

My network is behind a firewall, so I'm not too concerned about security.

I'm running 8.04 + current updates on various machines, all 32-bit x86.

Question information

English Edit question
Ubuntu mysql-dfsg-5.0 Edit question
No assignee Edit question
Solved by:
Matt Austin
Last query:
Last reply:
Best Matt Austin (mattaustin) said : #1

Hi Bill,

Try taking a look at /etc/mysql/my.cnf - there is a configuration option in there for the bind-address.

Rolando Blanco (rolando) said : #2

try oppening a terminal (Applications > Accesories > Terminal) and type then

    sudo dpkg-reconfigure mysql-server

2008/9/13 Matt Austin <email address hidden>

> Question #45026 on mysql-dfsg-5.0 in ubuntu changed:
> Status: Open => Answered
> Matt Austin proposed the following answer:
> Hi Bill,
> Try taking a look at /etc/mysql/my.cnf - there is a configuration
> option in there for the bind-address.
> --
> You received this question notification because you are an answer
> contact for Ubuntu.

Saludos Fraternos Ubunteros!
"No pases la vida tratando de hacer trabajar a tu computador,...
...haz que tu computador trabaje para ti, usa GNU/LINUX"
Rolando F. Blanco C:. (Ubuntu Member)
Director-TIC MSC, Consultores Gerenciales,C.A.
User: 399645 (GNU) Ubuntu: 3715
Ubuntu 8.04 (Hardy)

bill purvis (bill-billp) said : #3

Thanks Matt Austin, that solved my question.

bill purvis (bill-billp) said : #4

Tried Rolando's suggestion but it didn't seem to do anything much.
Edited my.cnf and ran /etc/init.d/mysql restart
and that fixed it.