Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Alternative Operating Systems > Urgent - Help Needed MySQL

Urgent - Help Needed MySQL
Thread Tools
Waragainstsleep
Posting Junkie
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 21, 2012, 02:47 PM
 
Hi all,

I'm trying to run AMP on an Android tablet and struggling to get mysql to work.

I installed an app called kswebserver which includes PHP and mysql. The device is rooted. From the terminal emulator, attempting to run the mysql command fails. I found the mysqld tucked away as part of the kswebserver app but if I try to execute it "./mysqld" I get a series of "Can't find messagefile...." errors and it fails.

Anyone got any ideas?
I have plenty of more important things to do, if only I could bring myself to do them....
     
mduell
Posting Junkie
Join Date: Oct 2005
Location: Houston, TX
Status: Offline
Reply With Quote
Jun 21, 2012, 06:41 PM
 
Your configuration may have the wrong basedir specified in it.
     
Waragainstsleep  (op)
Posting Junkie
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 21, 2012, 07:15 PM
 
Thanks for the input.

Mysql is usually installed in /usr somewhere but Android has no USR folder and it turns out the root of the filesystem is read only which is probably why it hasn't been installed there. If its not running, how can I tell where it is installed? I have found bits in at least three different folders.
I have plenty of more important things to do, if only I could bring myself to do them....
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 21, 2012, 10:41 PM
 
find /usr -name "mysqld"

Is there an init.d script in /etc/init.d?
     
Waragainstsleep  (op)
Posting Junkie
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 22, 2012, 05:04 AM
 
Problem with Android, there is no /usr

I can't even create one, it tells me that even with root access the top level of storage is a read only file system.

This install has a my.ini config file, which does list a --basedir option (the dir where the mysqld is located), even if I manually specify the --basedir option when trying to run ./mysqld I get the same errors.

[ERROR] Can't find messagefile '/usr/local/mysql/share/mysql/english/errmsg.sys'
[Warning] Can't create test file /usr/local/mysql/var/localhost.lower-test
[Warning] Can't create test file /usr/local/mysql/var/localhost.lower-test
./mysqld Can't change dir to '/usr/local/mysql/var/' {Errcode 2)

If I specify the base directory then these addresses do change but the errors otherwise stay the same even though the specified base dir exists and is writable.
I have plenty of more important things to do, if only I could bring myself to do them....
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 22, 2012, 05:42 AM
 
Doing a:

./mysqld --verbose --help | grep "/usr/local"

Should spit out all of the MySQL runtime config vars that contain /usr/local in them, maybe some variable has a hardcoded reference to something in /usr/local?

Do you have any of the following files?

/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/mysql5/my.cnf ~/.my.cnf

If so, it could be that these variables are being read and the file you found is just overriding some of these, if any.
     
Waragainstsleep  (op)
Posting Junkie
Join Date: Mar 2004
Location: UK
Status: Offline
Reply With Quote
Jun 22, 2012, 12:03 PM
 
No, its a totally custom installation, has to be because Android is nothing like as similar to Linux as it could be (as I wish it was). Building an AMP install with standard packages is not an option.

The mysql I have installed is part of an app I downloaded, I think its been highly modified.
I have plenty of more important things to do, if only I could bring myself to do them....
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jun 22, 2012, 01:42 PM
 
Originally Posted by Waragainstsleep View Post
No, its a totally custom installation, has to be because Android is nothing like as similar to Linux as it could be (as I wish it was). Building an AMP install with standard packages is not an option.

The mysql I have installed is part of an app I downloaded, I think its been highly modified.

I was thinking it could have had values hardcoded into it as compile, but I believe normally these are overridable via config files.

Can you compile/install your own version, one that follows conventions?
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 02:58 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,