Koozali.org: home of the SME Server

MySQL Administrator access denied

RobRoye

MySQL Administrator access denied
« on: August 01, 2005, 06:28:49 PM »
I have several SME servers and use the MySQL databases on all of them. In order to do anything with them, I have to use the command line via SSH to work with MySQL. I can do this, but it's a bit of a pain and I would perfer using MySQL Administrator instead - but it will not allow a connection. I have tried both internal and external networks to no avail.

How do you set the server to allow the connection?

Offline pfloor

  • *****
  • 889
  • +1/-0
MySQL Administrator access denied
« Reply #1 on: August 02, 2005, 03:34:11 AM »
This has been discussed over and over on these forums, it is in the documentation on this site http://no.longer.valid/phpwiki/index.php/SME%20Server%20Announce%20v6.0 and yet most have a hard time finding it so here is the answer again:

/sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
/sbin/e-smith/expand-template /etc/my.cnf
/etc/rc.d/init.d/mysqld restart
In life, you must either "Push, Pull or Get out of the way!"

Black

MySQL Administrator access denied
« Reply #2 on: August 02, 2005, 02:58:58 PM »
That's because the sites documentation is all over the place. I have been all over this site reading EVERYTHING I can and there's still stuff that I miss.

For example that link you posted:


http://no.longer.valid/phpwiki/index.php/SME%20Server%20Announce%20v6.0


note the "contribs.org/modules" or even the "phpwiki "is not clearly listed as a link to more documentation. Sure one could search the site over and over but why not have it in a logical place??

Why isn't that MYSQL Reference listed with other MYSQL Problems/Solutions??

Any documentation on this site should be under the documentation Link or FAQ. One place for everyone to go imo.

Offline pfloor

  • *****
  • 889
  • +1/-0
MySQL Administrator access denied
« Reply #3 on: August 02, 2005, 04:37:37 PM »
I was being sarcastic at best and trying to make the same point.  So instead of being cryptic, here is how I really feel:

This site is hard to navigate and very unorganized.

And before anyone jumps in and tells me to fix it myself, that would be impossible due to the fact that anyone can put anything anyplace they want.  As soon as I fix one problem, there would be 5 more somewhere else.

I hope as soon as the doc team is in place, they could take control of this site and organize everything.  My opinion is that the official part of the site would be controlled and organized and let anyone who wants to add content put it in a contrib section that they can do as they please.  The doc team could take good parts from the contrib section and incorporate them into the official documentation in the correct order and in the correct location.

The official documentation is so mixed with non-official items that it is hard to determine what works and what doesn't, for instance:

The commands above are written several different ways.  Some variations of this mysql commands state to use a service restart command and that has also been discussed in detail and is not correct.  I have seen posts from the developers stating that you should avoid a service restart command and always try to use an init.d type restart.

JMHO Paul
In life, you must either "Push, Pull or Get out of the way!"

RobRoye

MySQL Administrator access denied
« Reply #4 on: August 03, 2005, 05:39:21 AM »
Well, thanks for the information, but is that a command to run or files that require editing?

And I tend to agree, it's kinda hard to find things here sometimes. I try to look around and search before posting a question, but the answers can be hard to locate sometimes. Also, sometimes a person simply does not have long to spend searching for a hidden answer, so they simply ask again. My thanks for your patience and understanding.

Offline pfloor

  • *****
  • 889
  • +1/-0
MySQL Administrator access denied
« Reply #5 on: August 03, 2005, 06:02:39 AM »
Three seperate commands one after the other from the command line.

Full details from link above:

MySQL accepts only local connections

The mysql database daemon is configured by default to accept only local connections

(i.e. it is not accessible via the network). This is a security precaution.

We only use mysql for webmail preferences, and only require access from localhost.

If you wish to enable local network access, you can do so via

/sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
/sbin/e-smith/expand-template /etc/my.cnf
/etc/rc.d/init.d/mysqld restart


Good Luck,

Paul
In life, you must either "Push, Pull or Get out of the way!"

RobRoye

MySQL Administrator access denied
« Reply #6 on: August 03, 2005, 06:49:58 AM »
Thanks for the info - I'll try that as soon as I get to work and can get into the machines.

RobRoye

MySQL Administrator access denied
« Reply #7 on: August 03, 2005, 09:59:13 PM »
2 things:

1. It is /sbin/e-smith (with the dash)

2. It doesn't work. I still get "Access Denied"

Any other ideas?

Offline kruhm

  • *
  • 680
  • +0/-0
MySQL Administrator access denied
« Reply #8 on: August 07, 2005, 02:07:11 PM »
Use the following as a guideline. If you can't connect, you probably have a mysql permissions problem. Don't forget to flush the priviledges.

SME CHANGES TO ALLOW REMOTE MYSQL ACCESS
# by default the MySQL db's are onlyl available to the localhost on SME
#this allows access to other clients
-/sbin/e-smith/db configuration setprop mysqld LocalNetworkingOnly no
-/sbin/e-smith/expand-template /etc/my.cnf
-/sbin/service mysqld restart

# also create a user with priviledges from remote
#this creates user:mysqladmin with access to all db's with a password:password
-mysql
-grant all privileges on *.* to mysqladmin@'%' identified by 'password';
-flush privileges;

# if creating a web app of sorts
# grant user with rights to only the database at the localhost
-grant all privileges on application.* to application@localhost identified by 'password';
-flush privileges;

# to administor the mysql db's either use the phpmyadmin web interface or use the command line
-https://<yourserver>/phpmyadmin/

# to connect from remote, setup ODBC on the client

gknoll

bash error
« Reply #9 on: September 05, 2005, 07:01:16 AM »
I have entered the commands as listed but I get a BASH error telling me there is no such file or directory.

this is what I entered:
-/sbin/e-smith/db configuration setprop mysqld LocalNetworkingOnly no

I then get:

bash: -/sbin/e-smith/db: no such file or directory

I am logged in as root at a console.
What am I doing wrong? Am I understanding the instructions correctly?

Thanks for your time.
Greg

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: bash error
« Reply #10 on: September 05, 2005, 07:09:59 AM »
Quote from: "gknoll"
I have entered the commands as listed but I get a BASH error telling me there is no such file or directory.

this is what I entered:
-/sbin/e-smith/db configuration setprop mysqld LocalNetworkingOnly no

I then get:

bash: -/sbin/e-smith/db: no such file or directory

I am logged in as root at a console.
What am I doing wrong? Am I understanding the instructions correctly?

Thanks for your time.
Greg


Greg, take out the - from the front of your command.  it should be:

/sbin/e-smith/db configuration setprop mysqld LocalNetworkingOnly no

As a matter of fact, take the - out from in front of every command in the previous post.
In life, you must either "Push, Pull or Get out of the way!"

gknoll

Got it figured out. With some feed back
« Reply #11 on: September 05, 2005, 07:23:58 AM »
Ok here was the issue I had.
First, the instructions as quoted from the previous posts read as:

-/sbin/e-smith/db configuration setprop mysqld LocalNetworkingOnly no
-/sbin/e-smith/expand-template /etc/my.cnf
-/sbin/service mysqld restart

and

/sbin/esmith/config setprop mysqld LocalNetworkingOnly no
/sbin/esmith/expand-template /etc/my.cnf
/etc/rc.d/init.d/mysqld restart

and

/sbin/esmith/config setprop mysqld LocalNetworkingOnly no
/sbin/esmith/expand-template /etc/my.cnf
/etc/rc.d/init.d/mysqld restart

The errors in syntax are highlited in red

Now for the original post at http://no.longer.valid/phpwiki/index.php/SME%20Server%20Announce%20v6.0

/sbin/esmith/config setprop mysqld LocalNetworkingOnly no
/sbin/esmith/expand-template /etc/my.cnf
/etc/rc.d/init.d/mysqld restart

Now what I entered was:
/sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
/sbin/e-smith/expand-template /etc/my.cnf
/etc/rc.d/init.d/mysqld restart

So you can see where my frustration came from. But now I know, take the advice, but watch the syntax :lol:

Thanks to all and I hope this prevents any further frustation for any other nubies/novices.

Greg

Offline pfloor

  • *****
  • 889
  • +1/-0
MySQL Administrator access denied
« Reply #12 on: September 05, 2005, 07:41:48 AM »
WOW, I never even noticed that.  I am so used to typing "e-smith" all the time that it never even caught my eye.  Every command and directory is always e-smith and not esmith.

I have corrected my previous posts and the wiki.

Sorry,

Paul

P.S. I remember reading somewhere that you cna use either "config" OR "configuration".
In life, you must either "Push, Pull or Get out of the way!"

Offline raem

  • *
  • 3,972
  • +4/-0
MySQL Administrator access denied
« Reply #13 on: September 05, 2005, 08:47:48 AM »
pfloor

> I remember reading somewhere that you cna use
> either "config" OR "configuration"

Either way works OK
/sbin/e-smith/db configuration setprop mysqld LocalNetworkingOnly no

OR

/sbin/e-smith/config setprop mysqld LocalNetworkingOnly no

will do the same thing.

There is a common preference amongst developers to use

/sbin/e-smith/config ...whatever....
...