copying I mean literally everything, not just the database. I know we
can dump the database from one server then reload it to another one.
However, I have a specific need for this and here is my problem:
I have my development server as of RedHat 9.0 and I install the
combination of LAMPS (Linux+Apache+MySQL+PHP+SSL). I configure it
works perfectly on my development system under one root directory, for
instance /sysapps, by specifying the --prefix director points to that
system applications root dir. Now my target system is an SBC (Single
Board Computer) which has the capability of PC compatible for Linux
(Linux base SBC with PC memory map 100% compatible). I tar+gzip the
/sysapps on the development PC and gunzip+untar it to the target SBC.
First when I tried to start neither Apache nor MySQL works. It
complains about library and I figured out that the library that
currently on Dev. System is 2.3.2 (eg. libc-2.3.2.so, etc.) and on my
target SBC is 2.2.5. I copied all required libraries (from Dev system
to target SBC) and re-adjust the symbolic links on the target then the
Apache works fine. (I also add needed lines into /etc/ld.so.conf and
rerun /sbin/ldconfig as well)
Second I want to start MySQL then the daemon doesn't start (if I run
"top" then I see the system tries to start the daemon but then it
disappears) but if I look at the
/sysapps/mysql-4.0.21/data/<system_name>.err then I saw it says "mysql
started". I went a little further by running the
/sysapps/mysql/bin/mysqld_safe manually at the command prompt then
here is what I got:
[root@quangngai bin]#./mysqld_safe
Starting mysqld daemon with databases from /sysapps/mysql-4.0.21/data
../mysqld_safe: line 358: 219 Segmentation fault $NOHUP_NICENESS
$ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION
--datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking
$err_log 2>&1
STOPPING server from pid file
/sysapps/mysql-4.0.21/data/quangngai.ppnetworks.com.pid
040925 12:58:07 mysqld ended
So, it doesn't start at all since I got some problem but I couldnot
figure out what is the problem (I checked the mysqld_safe script and
line 358 doesn't contains very useful info-> that is the line end of
the while-loop).
Here is my general info:
+ MySQL 4.0.21
+ OS -> Linux
+ All neccessary configurations are set (eg. create mysql user,
group, change ownership on directories, etc. are set the same on both
dev. and target.)
and now my questions are:
1. Let's go back to the basic: Can I do this ?
2. From the difficulty above, looks like I can't. If I can't do
this to copy database from a development system to a target system
then what is the way to realize this (provided that my target SBC is
only small system then I can't just put gcc and all other goodies
stuffs on it to make it a development and production env). I am
pretty sure that I don't have to do the cross-compiling since all my
other stuffs I just develop on my Dev. system and it runs fine on the
target SBC (it even works with Apache+OpenSSL+PHP as aforemention)
3. I really need to have MySQL database server run on this target
SBC since it will definitely save me a ton of headache later in
developing my full-feature application suites. (I don't want to run
the client on my target SBC and access some database server somewhere.
My goal is to embed all system applications and user applications
into the same SBC).
4. If this is completely doesn't work, then what is the alternative
? I do want a database that support C-API and PHP (my application
does need these) like MySQL. Any suggestion ?
Thank you very much for all info and pointers to this request in
advance.
Regards,
Khue Pham