Messed up my.cnf file Help me guys

Status
Not open for further replies.

kos

Active Member
130
2010
0
0
Error in my Forum When i open usercp.php only ...

Database error in vBulletin 4.1.4:

Invalid SQL:

SELECT contenttype.contenttypeid AS itemid

FROM contenttype AS contenttype
INNER JOIN package AS package
ON package.packageid = contenttype.packageid LEFT JOIN product AS product
ON product.productid = package.productid
WHERE
1 = 1 AND (product.active = '1' OR package.productid = 'vbulletin') AND contenttype.canattach = '1';

MySQL Error : Incorrect information in file: './XXXXXXXX/contenttype.frm'
Error Number : 1033
Request Date : Saturday, September 24th 2011 @ 05:22:37 PM
Error Date : Saturday, September 24th 2011 @ 05:22:37 PM
Script : http://www.XXXXXX.com/usercp.php
Referrer : http://www.XXXXXX.com/showthread.php?t=173058
IP Address : XXXXXXXXX
Username : XXXXXXXX
Classname : vB_Database
MySQL Version : 5.0.92


This is my Present my.cnf file

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-innodb
max_connections = 500
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 64
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 1000M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1

[mysqldump]
quick
max_allowed_packet = 2000M

[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

[mysql.server]
user=mysql

[mysqld_safe]
open_files_limit = 8192
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[ndbd]
# If you are running a MySQL Cluster storage daemon (ndbd) on this machine,
# adjust its connection to the management daemon here.
# Note: ndbd init script requires this to include nodeid!
connect-string="nodeid=2;host=localhost:1186"

[ndb_mgm]
# connection string for MySQL Cluster management tool
connect-string="host=localhost:1186"


I got this error when i am Generating backup using SSH :(

mysqldump: Got error: 1033: Incorrect information in file: './XXXXXX/contenttype.frm' when using LOCK TABLES

Hope some one will solve my problem . Thank you very much waiting for replay :((
 
23 comments
using mysqlcheck

i.e. in shell/telnet/ssh type while mysql is running and forum is CLOSED:

mysqlcheck -r -u mysqlusername -p databasename

or via myisamchk repair functions while mysql is shutdown/stopped in shell/telnet/ssh type :

myisamchk -r -u root -p tablename

the second one most likely requires server and mysql root access to first stop mysql and then run myisamchk repair options.
 
mysqlcheck -r -u mysqlusername -p databasename
how to find
mysqlusername here :D

myisamchk -r -u root -p tablename
What is tablename here bro ?

Really thank you for replay brother :)
 
Go to this file in: WampFolder\apps\phpmyadmin[phpmyadmin version]\config.inc.php

You will see something like:

Code:
$cfg['Servers'][$i]['user'] = 'YOUR USER NAME IS HERE';
$cfg['Servers'][$i]['password'] = 'AND YOU PASSWORD IS HERE';

Try using the password and username that you have on that file.

Invoke myisamchk like this:

shell> myisamchk [options] tbl_name ...

The options specify what you want myisamchk to do. They are described in the following sections. You can also get a list of options by invoking myisamchk --help.

With no options, myisamchk simply checks your table as the default operation. To get more information or to tell myisamchk to take corrective action, specify options as described in the following discussion.

tbl_name is the database table you want to check or repair. If you run myisamchk somewhere other than in the database directory, you must specify the path to the database directory, because myisamchk has noidea where the database is located. In fact, myisamchk does not actually care whether the files you are working on are located in a database directory. You can copy the files that correspond to a databasetable into some other location and perform recovery operations on them there.

You can name several tables on the myisamchk command line if you wish. You can also specify a table by naming its index file (the file with the .MYI suffix). This allows you to specify all tables in a
directory by using the pattern *.MYI. For example, if you are in a database directory, you can check all the MyISAM tables in that directory like this:

shell> myisamchk *.MYI

If you are not in the database directory, you can check all the tables there by specifying the path to the directory:

shell> myisamchk /path/to/database_dir/*.MYI

You can even check all tables in all databases by specifying a wildcard with the path to the MySQL data directory:

shell> myisamchk /path/to/datadir/*/*.MYI

The recommended way to quickly check all MyISAM tables is:

shell> myisamchk --silent --fast /path/to/datadir/*/*.MYI

For more information on MyISAM check:

 
Last edited:
I have used this command "mysqlcheck -r -u mysqlusername -p databasename"
It's showing all are ok
except this two tables :(

Error : Incorrect information in file: './XXXXXX/contenttype.frm'
error : Corrupt
XXXXXX.cpsession
note : The storage engine for the table doesn't support repair

What to do now ? i have repaired contenttype in phpmyadmin even though no use :((

help me
 
Whats the storage engine of 'contenttype' ?
Were you using INNODB as the storage engine?
Does it work if you remove 'skip-innodb' from my.cnf and restart mysql?
 
Just a question which is the default storage engine?

Edit:

1. Open mysql in ssh:
Code:
mysql -u root -p

2. Supply the MySQL root password

3. Run:
Code:
SHOW VARIABLES LIKE 'storage%';

And paste output here.
 
Last edited:
Is this a new problem :( i got error bro
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
 
Is this a new problem :( i got error bro
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Hehe. Your MySQL root password differs from the ssh root password.

Dig on that later. Use the account you used for the commands to check the database.
 
Strange i tried all passwords which i have even though i am getting same error bro any other alternative way to retrieve storage engine ?
 
ok. lets say your username is 'username', to open mysql in ssh do:
mysql -u username -p
and supply the password.
Then run the cmd I told you :P

Anyway. A quick look to the issue shows me that vBulletin is a big fail like Xenforo.
It sets engine to INNODB even when it is not the default engine WITHOUT asking the user 1st!
 
+----------------+--------+
| Variable_name | Value |
+----------------+--------+
| storage_engine | MyISAM |
+----------------+--------+
1 row in set (0.02 sec)


Heheheh yeah bro understood u now :D . Will u please optimize my.cnf file bro :D

this is my present my.cnf file

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
max_connections = 500
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 64
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 1000M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1

[mysqldump]
quick
max_allowed_packet = 2000M

[mysql.server]
user=mysql

[mysqld_safe]
open_files_limit = 8192
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[ndbd]
# If you are running a MySQL Cluster storage daemon (ndbd) on this machine,
# adjust its connection to the management daemon here.
# Note: ndbd init script requires this to include nodeid!
connect-string="nodeid=2;host=localhost:1186"

[ndb_mgm]
# connection string for MySQL Cluster management tool
connect-string="host=localhost:1186"
 
Status
Not open for further replies.
Back
Top