HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   MySql on Ubuntu 6.06 LTS Server (http://www.howtoforge.com/forums/showthread.php?t=9494)

Bubo 2nd January 2007 14:36

MySql on Ubuntu 6.06 LTS Server
 
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:

[root@192.168.10.222;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

martinfst 2nd January 2007 15:32

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.

falko 3rd January 2007 17:51

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

Bubo 3rd January 2007 17:59

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

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

Bubo 3rd January 2007 18:02

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

martinfst 3rd January 2007 22:11

After the 'GRANTS' did you issue the MySQL command
Code:

flush privileges;

Bubo 4th January 2007 18:59

Martin

Quote:

After the 'GRANTS' did you issue the MySQL command
Code:
flush privileges;
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 cock 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 :o

Thanks for the help so far.

Bubo

falko 5th January 2007 16:23

Quote:

Originally Posted by Bubo
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 cock up MySQL which is getting a little tedious.

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.


All times are GMT +2. The time now is 10:11.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.