Using MySQL on SMEserver
smeserver is a fantastic server package on linux platform. Smeserver 7.2 is based on CentOS 4.6. Using mysql for user databases is not possible by default and some tricks are needed.
MySQL on contrib.org ’s smeserver
Here are some notes from http://wiki.contribs.org/MySQLThis is not a verbatim copy, rather there may be modifications, as I used these for my own use
Reference:
Installed version of sme server 7.2
MySQL as installed by default on smeserver (ver 7.2 , 7.3)
- Uses Socket (to be used from localhost) and networking is off
- Does not require password for root user, if you give command ‘mysql mysql’ from shell prompt, you are automatically logged as root with highest privileges. This only works when logged in the shell
- There is no Mysql administrative interface
Steps to use MySQL on smeserver
A. Configure MySQL to use networking.
By default, on smeserver it is configured to use sockets, rather than ports. This is to access database *only* from local network. For remote access see section, D
(This is modified as mentioned on the wiki page referred to above. I have tried this and found to be working, whereas the method given in the wiki does not work )
cd /var/service/mysqld sv d . config setprop mysqld LocalNetworkingOnly no expand-template /etc/my.cnf sv u .
Method for above as given in wiki
config setprop mysqld LocalNetworkingOnly no expand-template /etc/my.cnf /etc/rc.d/init.d/mysqld restart
This causes system to hang and MySQL does not restart gracefully.
B. Create database
mysqladmin create <dbname>
C. Create User and also add hosts for this user/db combination
mysql_setpermission is an interactive, text based utility for user and user, database, host management
mysql_setpermission
use above interactive program to (a) create user, (b) add access rights to user, database and host combinations.


