Re: [LemonPOS-general] database access
Status: Beta
Brought to you by:
mchavezg
From: Randy <the...@gm...> - 2012-02-20 20:05:52
|
On Monday, February 20, 2012, you wrote: > I am having real issues getting the database to work for multiple clients. > At this time there are only 3 clients. > > Client 1 is counter sales. (Debian Squeeze w/ lemonpos compiled from > source.) This box has a 250g drive and will be the database. ip > 192.168.86.103 set static by dhcp (dd-wrt) > > Client 2 is recieving (system is same as above) This box has 80g drive and > dynamic ip (wifi) and is on a moble stand. > > Client 3 is the owners laptop. (not setup yet, will be a vm on mac, the vm > is currently on my laptop for setup purposes) the system is the same a > above but 40g dynamic drive. > > Let's deal with client 1 first. After entering some test data in the > Squeeze admin module I thought it should show up in the pos but it does > not. I also entered a couple of users and they show up and are useable in > the pos. But the test products are not. i have restarted the machine > several times, still no joy. > > I edited /etc/mysql/my.cnf to reflect bind-address = 192.168.86.103 ip > of the database but then I can't connect to it. And currently the pos is > trying to access it and I can't get it to stop. I have killed it and > restarted the machine but when it is relaunched it tries to access the > database via ip and not localhost and hangs. How to correct? Where is > the config file put when installed from source? I currently have > bind-address set to 0.0.0.0 and that allows squeeze to connect to it but > pos is still hung on 192.168.86.103. > > I have been looking at the lemon_mysql.sql and it appears that to set up > remote access more users need to be created. From said file > > # -- Create the database user for lemon... -- > > # This user is for connecting to mysql... which makes queries to mysql. > #If setting up a network of POS add each host (@box1, @box2, @box3) > #Here are only 'localhost' to ensure nobody else can do any changes from > other host. > > # Note: if you change the password to the lemonclient user (which is a > must), # also re-grant it again with the new password. see the grant > clause below. > > #CREATE USER 'lemonclient'@'localhost' IDENTIFIED BY 'xarwit0721'; > GRANT ALL ON lemondb.* TO 'lemonclient'@'localhost' IDENTIFIED BY > 'xarwit0721'; > > > # CREATE lemon users (users using lemon, cashiers... ) > #With password 'linux'. Note that this password is salt-hashed (SHA56). > > Something like > > GRANT ALL ON lemondb.* TO 'lemonclient'@'192.168.86.103' IDENTIFIED BY > 'some- unique-password'; > GRANT ALL ON lemondb.* TO 'lemonclient'@'192.168.86.102' IDENTIFIED BY > 'some- unique-password'; > GRANT ALL ON lemondb.* TO 'lemonclient'@'192.168.86.101' IDENTIFIED BY > 'some- unique-password'; > > > Please be gentle I have no database experiance. > > Thanks > > Randy OK, I did get access from the second machine with the above user added, but I did not create a unique password. The test user I created show up and are useable but the test products I entered are still not useable from the pos. It is there in squeeze and is editable. I have looked at the docs but don't see any mention of a "publish" feature to send the data to the database. When I installed from source I deleted the old database with mysql -u root -p mysql> drop database lemondb; and used the install instructions to reset it up. I did notice that some of the data from the old install must have remained in a config file somewhere because some old users data showed up when I went to add new users again. I used synaptic to remove the original install with the purge/remove configs option. thanks Randy -- If it ain't broke tweek it |