MySql on Ubuntu 6.06 LTS Server

Discussion in 'Server Operation' started by Bubo, Jan 2, 2007.

  1. Bubo

    Bubo New Member

    Hi All

    I am trying to setup a stand alone MySql server for a specific task in our office. I have followed the howto (perfect ubuntu 6.06) up to and including the mysql installation.

    I can then get a mysql prompt by entering:

    Code:
    mysql -u root -p <password>
    .

    Our lan is as follows:

    192.168.10.1 - Smoothwall handling DHCP across lan + firewall
    192.168.10.2 - Win 2003 Server handling DNS for lan and running active directory for authenticating a dozen or so Windows boxes.

    I have set the Ubuntu server as static IP on 192.168.10.222.

    netstat -tap shows mysql listening on all and I can ping 192.168.10.222 from a windows box on the lan.

    When I try and ping the host/domain name (server2.<hostname>) however I get host not found so I am thinking perhaps a DNS issue?

    I wanted to use a gui adminstrator for mysql as I am fairly new to it, so I chose MySql Control Centre on my Windows box.

    When I try to connect to the Mysql Server using this I get this error:

    Code:
    [[email protected];3306] ERROR 1130: Host '192.168.10.144' is not allowed to connect to this MySQL server
    
    So my question is, what is preventing me accessing this server across the lan and how can I resolve the issue?

    Thanks in advance.

    Bubo
     
  2. martinfst

    martinfst Member Moderator

    This looks like a response from the MySQL server, so the only thing left to do is to grant permissions to the user in MySQL. Normally you only get 'localhost' access. Use phpmyadmin or similar to change the permissions of the the user you want to connect with. For which I wouldn't use 'root', but that's a simple security matter.
     
  3. falko

    falko Super Moderator Howtoforge Staff

    martinfst is right, you need a user with 192.168.10.144 in the Host field in the mysql.user table.
     
  4. Bubo

    Bubo New Member

    Thanks for that but I am still a little confused :eek:

    I created the user as follows:

    Code:
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost'
        ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'%'
        ->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
    
    which I thought should allow access from anywhere on the lan.

    I can then connect from my Win box using this username however when I try and use a specific windows app to connect I get the access denied message again.

    Its all very confusing :confused:

    Bubo
     
  5. Bubo

    Bubo New Member

    Forgot to mention, the winows app came bundled with mysl 4.1 for windows.

    I have installed mysql 5 on the Ubuntu server. Will that version difference cause this kind of error ? I didn't think so but am willing to be told otherwise.

    Bubo
     
  6. martinfst

    martinfst Member Moderator

    After the 'GRANTS' did you issue the MySQL command
    Code:
    flush privileges;
     
  7. Bubo

    Bubo New Member

    Martin

    No I didn't, I'll try that and report back.

    Things have got a little more complicated now as for various reasons I need to put the Ubuntu server into our domain. I know that I have to use kerberos, ldap and a few other apps but don't really have a clue where to start. I've read through the howto on this site but that is for Gentoo and I am struggling to convert things to Ubuntu. Can anyone point me to a good howto or offer some advice as to how to proceed (or would this be better in a seperate thread?).

    The other thing I wanted to ask is when I make a pigs ear of MySQL (which is happening alot lately :D ) is there a way that I can just un-install MySQL then re-install to try again. When I try:

    Code:
    apt-get remove mysql-client mysql-server libmysqlcient15-dev
    
    the mysql folder on /etc is not repopulated and I end up with the same problems that I had before I re-installed. If I manually delete the mysql folder from /etc before I re-install the folder is not created again on re-installation. I have been having to re-install the whole server setup from scratch everytime I **** up MySQL which is getting a little tedious.

    I am sorry if these are stupid questions, I am trying to get my head round this - honest :eek:

    Thanks for the help so far.

    Bubo
     
  8. falko

    falko Super Moderator Howtoforge Staff

    You can try
    Code:
    apt-get --purge remove mysql-client mysql-server libmysqlcient15-dev
    This will not only remove the applications, but also their configuration files, etc.
     

Share This Page