Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: RobRoye 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?
-
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
-
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.
-
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
-
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.
-
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
-
Thanks for the info - I'll try that as soon as I get to work and can get into the machines.
-
2 things:
1. It is /sbin/e-smith (with the dash)
2. It doesn't work. I still get "Access Denied"
Any other ideas?
-
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
-
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
-
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.
-
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
-
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".
-
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....