Reading .MYD file of Mysql Tables
am 10.01.2011 05:14:19 von Adarsh Sharma
Dear all,
I am facing a issue which should be resolved by editing .MYD file of a
Table.
I know there are 3 files foe a MyISAM table in Mysql but i want to read
and edit some changes in .MYD file.
If it is possible , Can anyone PLease tell me the way to do this.
Thanks & Regards
Adarsh Sharma
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: Reading .MYD file of Mysql Tables
am 10.01.2011 05:17:26 von Reindl Harald
--------------enig4383F1089E7EECCADD54BA2A
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Why in the world will you manually change a binary file form a db-server
instead using sql-statements?
I would mean this is russian roulette with no winning chance
Am 10.01.2011 05:14, schrieb Adarsh Sharma:
> Dear all,
>=20
> I am facing a issue which should be resolved by editing .MYD file of a =
Table.
>=20
> I know there are 3 files foe a MyISAM table in Mysql but i want to read=
and edit some changes in .MYD file.
>=20
> If it is possible , Can anyone PLease tell me the way to do this.
>=20
>=20
> Thanks & Regards
> Adarsh Sharma
--------------enig4383F1089E7EECCADD54BA2A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk0qiFYACgkQhmBjz394AnkotwCeNDa8ykalWvsXQow//WFM iQ15
RKcAnjhRditLiP+CWJuh9F94AnMXNyJw
=gJz3
-----END PGP SIGNATURE-----
--------------enig4383F1089E7EECCADD54BA2A--
RE: Reading .MYD file of Mysql Tables
am 10.01.2011 17:42:53 von Rolando Edwards
In reality, you better off manipulating the MyISAM tables via SQL.
However, if you really are that adventurous about low-level reads of MyISAM=
tables, I have a crazy suggestion for you !!!
The old MySQL book used as reference to MySQL 3.23/4.0 describes manipulati=
ng a MyISAM table with an API that reminds me so much of manipulating DBF f=
iles via the DBASE/Clipper/FoxPro programming language.
The book is called "MySQL Reference Manual" (ISBN 0-596-00265-3 ,Published =
June 2002)
http://www.amazon.com/s/ref=3Dnb_sb_noss?url=3Dsearch-alias% 3Dstripbooks&fi=
eld-keywords=3D0-596-00265-3
It was Chapter 6, pages 512,513 Section 6.4.2 HANDLER Syntax.
This same information appears at the following URLs:
http://dev.mysql.com/doc/refman/5.5/en/handler.html
http://download.oracle.com/docs/cd/E17952_01/refman-5.0-en/h andler.html
Keep mind that this is a read-only MyISAM API. No low-level writes are avai=
lable with that API.
If you need to edit the MyISAM table structure, you should definitely used =
ALTER TABLE.
However, if you really are that adventurous about table structure manipulat=
ion of MyISAM tables, I have a crazy suggestion for you !!!
A more recent book, called "High Performance MySQL, Second Edition" (ISBN 0=
-0596-10171-8, Published June 2008)
http://www.amazon.com/s/ref=3Dnb_sb_noss?url=3Dsearch-alias% 3Dstripbooks&fi=
eld-keywords=3D0-596-10171-8
has a section "Speeding up ALTER TABLE" on Pages 146-149 on how to doctor t=
he .MYI file to add new columns and the "gotchas" in doing it that way.
If you want to writes and updated to column data in a MyISAM table, I have =
no crazy suggestions except one : Download the C source code for the MyISAM=
storage engine, study it, and have fun with it.
If you just need faster write performance on MyISAM tables, use one or both=
of the following:
1) INSERT DELAYED for a single row (be prepared to suffer up to one second =
of data loss in the event of a crash)
2) LOAD DATA INFILE for bulk loading of data (please set bulk_insert_buffer=
_size to something like 512M)
3) More suggestions at http://kevin.vanzonneveld.net/techblog/article/impro=
ve_mysql_insert_performance/
I hope these ramblings of mine helped. Please write back to the MySQL Lists=
and let us all know what you tried and if it worked. Have a good day !!!
Rolando A. Edwards
MySQL DBA (SCMDBA)
155 Avenue of the Americas, Fifth Floor
New York, NY 10013
212-625-5307 (Work)
201-660-3221 (Cell)
AIM & Skype : RolandoLogicWorx
redwards@logicworks.net
http://www.linkedin.com/in/rolandoedwards
-----Original Message-----
From: Adarsh Sharma [mailto:adarsh.sharma@orkash.com]=20
Sent: Sunday, January 09, 2011 11:14 PM
To: mysql@lists.mysql.com
Subject: Reading .MYD file of Mysql Tables
Dear all,
I am facing a issue which should be resolved by editing .MYD file of a=20
Table.
I know there are 3 files foe a MyISAM table in Mysql but i want to read=20
and edit some changes in .MYD file.
If it is possible , Can anyone PLease tell me the way to do this.
Thanks & Regards
Adarsh Sharma
--=20
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dredwards@logicworks=
..net
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg