Later. At least got rid of the bdb log issue by giving it a path in /var. Now back to the
Code:mysqld: Can't find file: './mysql/host.frm' (errno: 13)
Remastered knoppix. But before did this, tested it on my usb flashdrive. All had to do was tell it in my.cnf
where the datadir was. Thought tested it before on the windows drive, but may not have.
1) With datadir /var/lib/msyql
If start up a unremastered Knoppix cd mysql will start fine. If put my remasted knoppix in it will start fine.
2) When put the datadir on the Windows drive (hda1). Mysql will not start, only thing edited was the --datadir.
The weird thing is that had this working several times when tried it at first, complained about something, but was
able to access the database and everything worked.
Code:root@ttyp1[knoppix]# /etc/init.d/mysql start Starting MySQL database server: mysqld...failed. Please take a look at the syslog.Tried it with 'mysqld --bdb-no-recover' also, but get same results. Also not sure why it is trying to right the bdbCode:root@ttyp1[knoppix]# mysqld 041229 0:10:31 Warning: Setting lower_case_table_names=2 because file system for /mnt/hda1/mysql/ is case insensitive 041229 0:10:31 bdb: /mnt/hda1/mysql/log.0000000001: Permission denied 041229 0:10:31 bdb: PANIC: Permission denied 041229 0:10:31 Can't init databases 041229 0:10:31 Aborting 041229 0:10:31 mysqld: Shutdown Complete
log to the widows drive.
3) here is what have installed:
4) Got a little further. Was able to start it with datadir= /mnt/flash/mysql if changed the usb flashdrive (/mnt/flash) to 777 permissions.Code:ii mysql-client 4.0.22-2 mysql database client binaries ii mysql-common 4.0.22-2 mysql database common files (e.g. /etc/mysql/my.cnf)
But if change datadir= /mnt/hda1/msyql still won't start. Tried, but can't seem to get the permission to change on /mnt/hda1 to test it.
Well, went back to Gentoo and had trouble with it being on /dev/hda1 also for datadir. So, you can't put MySQL datadir on
a Windows98 system? Hope that isn't the case, cause it was the whole purpose of remastering Knoppix.
Later. At least got rid of the bdb log issue by giving it a path in /var. Now back to the
Code:mysqld: Can't find file: './mysql/host.frm' (errno: 13)
You seem to be missing mysql-server and mysql-max packages. The latter is necessary for BDB.Originally Posted by Decibels
Make sure that all the directories that MySQL expects to use are 'rw'. Issue the mount command and post the output, it should look something close to:
if the line containing /dev/hda1 in your mount is 'ro', MySQL is going to fail. Keep in mind that besides the datafiles, MySQL needs the 'socket file', logs, etc on rw media. You might need to fine tune your my.cnf file and specify it in the command line to mysqld or mysqld_safe. If you are starting mysql using the /etc/init.d/mysql script it won't work from CD.Code:/proc on /proc type proc (rw) automount(pid1012) on /mnt/auto type autofs (rw,fd=4,pgrp=1012,minproto=2,maxproto=4) /dev/cdrom on /usr/share/knoppix-remaster/cd_orig type iso9660 (ro)
Last but not least, for diagnosis purposes start mysql in console mode.
Check http://dev.mysql.com/doc/mysql/en/In...ng_binary.html and http://dev.mysql.com/doc/mysql/en/Un...stallation.html for plenty of clues on what to look for.
--GN
Thanks for the reply gnarvaja.
Actually I do have the server installed, must have been tired and missed it?
Not sure how missed that. Don't use BDB, so that was why was suprised why it came up.Code:ii mysql-server 4.0.22-2 mysql database server binaries
Got rid of that error like mentioned above, by specifying a path for BDB logs.
The whole problem is trying to use MySQL from Knoppix, but store the database one windows (VFAT).
The only error getting now is that it can't find the host.frm.
It is there in the VFAT partition, in /mnt/hda1/mysql/mysq/ . Haven't found anything on the net to specify/clarifyCode:Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
a path or fix that error, except changing permissions. Which can't do on the vfat.
There are some people saying they have done it. This one appears a lot when search google:
https://www.redhat.com/archives/psyc.../msg00009.html
That didn't work either, same host.frm error!
Symlinking doesn't work either. Seems there is no way to store the database on a VFAT system.
Actually you can. I moved my databases over and burnt the remaster.If you are starting mysql using the /etc/init.d/mysql script it won't work from CD.
Started mysql with /etc/init.d/mysql start
Then logged in:Code:root@ttyp1[knoppix]# /etc/init.d/mysql start Starting MySQL database server: mysqld. Checking for crashed MySQL tables in the background.
** Later: Now this is getting weird!!!Code:root@ttyp1[knoppix]# mysql -pdecibels -udecibels Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 to server version: 4.0.22-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show databases; +----------+ | Database | +----------+ | PyStocks | | mysql | | test | +----------+ 3 rows in set (0.01 sec) mysql> exit Bye
Just after writing the above, since can't change the my.cnf on the CD, it started with mysqld with --datadir option.
And it worked!?!?! Why, not sure, I had been trying this from the chroot in the remaster scripts and got the host.frm error.
So, on the remastered CD:
Logged in on the database as user and worked.Code:root@ttyp3[knoppix]# mysqld --datadir=/mnt/hda1/mysql 041230 21:47:28 Warning: Setting lower_case_table_names=2 because file system for /mnt/hda1/mysql/ is case insensitive mysqld: ready for connections. Version: '4.0.22-log' socket: '/var/run/mysqld/mysqld.sock' port: 0 Source distribution
Just to make sure, left /mnt/hda1 mounted, but renamed the mysql folder to mysql.orig after shutting down the server.
Then tried to restarted it the same way:
So it is either cause of the CHROOT env that it didn't work on the harddrive when remastering. Or it is working now onCode:root@ttyp3[knoppix]# mysqld --datadir=/mnt/hda1/mysql 041230 21:46:59 Warning: Can't create test file /mnt/hda1/mysql/Knoppix.lower-test mysqld: Can't change dir to '/mnt/hda1/mysql/' (Errcode: 2) 041230 21:46:59 Aborting 041230 21:46:59 mysqld: Shutdown Complete
the CD cause either it is working OR the data is also in /var/lib/mysql.
Just when you think you have one thing done up pops another. Now have to remaster again, remove the /var/lib/mysq databases.
Leave /mnt/hda1/mysql alone and see if works. Then also test with leaving my.cnf as datadir=/var/lib/mysq and entering the datadir
on commandline option and with my.cnf as datadir=/mnt/hda1/mysql .
The reason is because not sure WHY it is WORKING now! Haven't tried saving any data to database, out of time have to got
to work. But seems to be working now and not sure why.
You might find this URL useful.
http://truth.positive-internet.com/~...0412intro.html
It has details and screenshots of a remastered Knoppix I have called Toophpix.
Regards,
Mark Preston
Looking at the details, how they do it is something that I had considered.
Earlier attempts I was able to dump to the vfat partition, thought about loading
it into ram when starts up. But the problem with that, is my database is
quite large. I am trying this for my brothers, they don't have as much ram
as I do, no swap space and nil knowledge of Linux. So dropped that idea.
Thanks for looking at the info though, need to see how much memory my databaseBy loading a MySQL database into RAM it allows users to enter data. The input patient details can then be saved to, and restored from, USB sticks or floppy disks by clicking desktop icons.
and gui based program use.
Need to see today why was able to do what accomplished earlier. Going to try the
same thing in the remaster chroot. Thought had though.
Thanks again, will keep that idea in mind still.
Ran some test to see which way to make it work, doesn't explain everything, but shows
what works and doesn't. Forgot to run them in the chroot env. Will do that later.
For the new cd:
1) Made a new my.cnf called my.cnf1 and changed the datadir=/mnt/hda1/mysql
2) Renamed the /var/lib/mysql folder to /var/lib/mysql.orig on the CD, to make sure it wasn't used.
3) /etc/fstab left as default, /dev/hda1 wasn't marked rw in line or ro. FYI
4) stopped mysql after each test.
5) Logged in to mysql each time as user.
Test 1:
Mount /mnt/hda1 as root.
start Mysql with: mysqld --datadir=/mnt/hda1/mysql
using default /etc/mysql/my.cnf
**Didn't work.
Test 2:
Same as Test 1, but mount /mnt/hda1 as user.
**Works, have to make sure give password or only see test database.
Test 3:
/mnt/hda1 still mounted as user.
start Mysql with mysqld --defaults-file=/etc/mysql/my.cnf1 (the one with /mnt/hda1/mysql)
** Works.
Test 4:
Same as Test 3 but mounted /mnt/hda1 as root.
** Works.
Why one worked as root and not the other not sure, will try and repeat the test tomorrow.
Test 5:
Started up my gui program wrote. Deleted some stuff. Quit and restarted program.
** Data remained deleted.
Running under a chroot environment is tricky. If you are remastering often, you may want to check the cheatcodes to boot from an iso image or a cloop file. It will save you time and the tests will be much closer to the real deal.
Cheers,
--GN
Glad to see you think it might be the chroot env also.
It is hard to test out the scripts I write also when have to compress, mkiso, burn, start over.If you are remastering often, you may want to check the cheatcodes to boot from an iso image or a cloop file. It will save you time and the tests will be much closer to the real deal.
So my sanity might be saved from further destruction.
I have actually gotten it to work from the remastered cd. Have noticed most of the time using mysqld [options] works better than mysqld_safe [options]. Even using adding the & to put it in the background locks up that console. Can open another console session and access the database, but wonder how that is going to work in scripts? Will find out. Does anyone know why 'mysqld_safe &' works, but locks up the console session?
Still booting from cloop or iso is going to be pretty much like booting from a remastered knoppix isn't it? Cause unless it is on a media like CD,... your going to have to chroot to it? Am I missing something?
It took me a while, but I'm back.
I master a new 'remaster' process that simplified my life a lot more, but one of the things that let me kneep my sanity is to burn onto CD-RW.Originally Posted by Decibels
Regarding mounting from ISO/cloop, those mounts are all RO, the cheat code is:
You'll have to replace the device, path and iso file to your own.Code:fromhd=/dev/hda1/remaster/KNX.iso
Good luck,
--GN

Lenovo Thinkpad T14 Gen 1 14" 16GB 512GB, BLACK
$218.99
Lenovo Thinkpad X1 Yoga Gen 6 14" 16GB, Storm Gray
$356.80
Lenovo ThinkPad E14 Gen 3 Laptop 14” FHD AMD Ryzen 5 16GB RAM 512GB SSD Win 11
$374.99
Lenovo ThinkPad L15 Gen 3 15.6" 16GB, Thunder Black
$241.50
Lenovo Legion 5 Gaming 15.1" WQXGA OLED 165Hz Core i9-14900HX 16GB 1TB RTX 5070
$1469.00
Lenovo ThinkPad T14 Gen 1 14" AMD Ryzen 5 16GB 256GB SSD
$219.99
Lenovo ThinkPad T14 G2 14-Inch AMD Ryzen R5 5650U 16GB, 512GB SSD Win 11 Pro
$398.99
Lenovo - IdeaPad Slim 3i 15.3" 2K Touchscreen Laptop - Intel Core 7 350 2026 ...
$679.99
Lenovo Thinkpad E15 Gen 2 8GB RAM 256GB SSD Intel Core [email protected] Laptop
$220.36
Lenovo Thinkpad T590 Gen1 8th Core i7 32GB 512GB Touchscreen RJ45 Win 11 Pro
$339.00