Posts Tagged ‘root’

Setting up MySQL on Ubuntu

Wednesday, April 29th, 2009

Setting up MySQL to connect to from PLESK for example is very simple

apt-get install mysql-server

Then, you will need to allow mysql to listen to the outside world

Edit /etc/mysql/my.cnf

and comment out the line

bind-address = 127.0.0.1

then, you will need to allow the root user to connect from outside the server

On the command prompt

mysql -uroot –password=”aPassWord”

use mysql;
select host, user from user;

Now look for the root user with the hostname of the machine, assuming it came out as thishost

update user set host=’%’ where user=’root’ and host=’thishost’;

flush privileges;

quit

And you should be all set

If you don’t perform the above operations, PLESK will complain when you add the server to the list of database servers, You will probably see an error like

Error: Test connection to the database server has failed because of network problems:
Failed to connect to database: Can’t connect to MySQL server on ‘host.domain.com’ (10061)