My box is redhat 9 and installed xampp 1.6.6.

When I met server's error "DB connection error", I ran myisamchk and got this result.

root@:/opt/lampp/bin>myisamchk /opt/lampp/var/mysql/mysql/*
myisamchk: error: '/opt/lampp/var/mysql/mysql/columns_priv.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: 138 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/columns_priv.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/columns_priv.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/db.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
myisamchk: Character set '#83' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
myisamchk: error: 142 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/db.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/db.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/func.MYD'

---------

Checking MyISAM file: /opt/lampp/var/mysql/mysql/func.MYI
Data records:       0   Deleted blocks:       0
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/func.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/help_category.MYD'

---------

myisamchk: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
myisamchk: Character set '#33' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
myisamchk: error: 142 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/help_category.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/help_category.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/help_keyword.MYD'

---------

myisamchk: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
myisamchk: Character set '#33' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
myisamchk: error: 142 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/help_keyword.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/help_keyword.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/help_relation.MYD'

---------

Checking MyISAM file: /opt/lampp/var/mysql/mysql/help_relation.MYI
Data records:       0   Deleted blocks:       0
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/help_relation.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/help_topic.MYD'

---------

myisamchk: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
myisamchk: Character set '#33' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
myisamchk: error: 142 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/help_topic.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/help_topic.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/host.MYD'

---------

myisamchk: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
myisamchk: Character set '#83' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
myisamchk: error: 142 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/host.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/host.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/proc.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
myisamchk: Character set '#83' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
myisamchk: error: 142 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/proc.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/proc.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/procs_priv.MYD'

---------

myisamchk: error: 138 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/procs_priv.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/procs_priv.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/tables_priv.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: 138 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/tables_priv.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/tables_priv.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/time_zone.MYD'

---------

Checking MyISAM file: /opt/lampp/var/mysql/mysql/time_zone.MYI
Data records:       0   Deleted blocks:       0
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/time_zone.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/time_zone_leap_second.MYD'

---------

Checking MyISAM file: /opt/lampp/var/mysql/mysql/time_zone_leap_second.MYI
Data records:       0   Deleted blocks:       0
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/time_zone_leap_second.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/time_zone_name.MYD'

---------

myisamchk: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
myisamchk: Character set '#33' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
myisamchk: error: 142 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/time_zone_name.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/time_zone_name.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/time_zone_transition.MYD'

---------

Checking MyISAM file: /opt/lampp/var/mysql/mysql/time_zone_transition.MYI
Data records:       0   Deleted blocks:       0
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/time_zone_transition.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: -1 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/time_zone_transition_type.MYD'

---------

Checking MyISAM file: /opt/lampp/var/mysql/mysql/time_zone_transition_type.MYI
Data records:       0   Deleted blocks:       0
- check file-size
- check key delete-chain
- check record delete-chain
- check index reference
- check data record references index: 1

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/time_zone_transition_type.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/user.MYD' doesn't have a correct index definition. You need to recreate it before you can do a repair

---------

myisamchk: File '/usr/share/mysql/charsets/?.conf' not found (Errcode: 2)
myisamchk: Character set '#83' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file
myisamchk: error: 142 when opening MyISAM-table '/opt/lampp/var/mysql/mysql/user.MYI'

---------

myisamchk: error: '/opt/lampp/var/mysql/mysql/user.frm' doesn't have a correct index definition. You need to recreate it before you can do a repair
root@:/opt/lampp/bin>

Any comment for this problem would be appreciated.

    5 days later

    try repairing the database. Execute REPAIR TABLE on each of the failing tables.

      bpat1434;10925148 wrote:

      try repairing the database. Execute REPAIR TABLE on each of the failing tables.

      bpat1434/ Thanks.😉

        Write a Reply...