PDA

View Full Version : MySQL Error


Joshua Clinard
Fri 14th Dec '01, 2:56pm
What is this error?

Invalid SQL: SELECT user.*,userfield.* FROM user LEFT JOIN userfield ON userfield.userid=user.userid WHERE user.userid='119'
mysql error: Can't open file: 'user.MYD'. (errno: 145)

mysql error number: 1016

Freddie Bingham
Fri 14th Dec '01, 3:26pm
Your database is crashed. Upload repair.php from the vbulletin .zip file to your forums directory and then open it in your broweser.

Joshua Clinard
Fri 14th Dec '01, 3:29pm
I already tried that, and it wouldn't run, because it said there was a problem with the database.

Freddie Bingham
Fri 14th Dec '01, 3:51pm
Run the query (if you have phpmyadmin setup):

REPAIR TABLE user;

eva2000
Fri 14th Dec '01, 3:53pm
Originally posted by Joshua Clinard
I already tried that, and it wouldn't run, because it said there was a problem with the database. what was the exact error you received ?

Joshua Clinard
Fri 14th Dec '01, 3:56pm
Thank you so much. I can't believe it was that simple. Should I try to repair any other tables, or try repair.php again?

eva2000
Fri 14th Dec '01, 4:11pm
Originally posted by Joshua Clinard
Thank you so much. I can't believe it was that simple. Should I try to repair any other tables, or try repair.php again? with your forum closed rerun repair.php and see if it okays all the databases... sessions table excluding

Joshua Clinard
Fri 14th Dec '01, 4:16pm
It says everything is ok, and every table is already up to date. Is there any more preventative maintenaince I can do?

eva2000
Fri 14th Dec '01, 4:19pm
Originally posted by Joshua Clinard
It says everything is ok, and every table is already up to date. Is there any more preventative maintenaince I can do? what version of mysql are you using ? is the server whm/cpanel based ?

Joshua Clinard
Fri 14th Dec '01, 4:23pm
mysql 3.23. It is Cpanel based.

I am making a backup as I type.

eva2000
Fri 14th Dec '01, 4:26pm
Originally posted by Joshua Clinard
mysql 3.23. It is Cpanel based.

I am making a backup as I type. oh then you're in luck most cpanel based servers are updated nightly so your mysql version should be 3.23.39 - 3.23.43 at the moment which qualifies for using the mysqlcheck option http://www.mysql.com/doc/U/s/Using_mysqlcheck.html

what you can do is in cpanel set up a cronjob to run a command nightly or weekly like

mysqlcheck --auto-repair -u MYSQLUSERNAME -pMYSQLPASSWORD databasename

Carnage Media
Fri 28th Dec '01, 7:20pm
I had this exact same problem today when RS's power got cut off, it pays to search for answers instead of reposting the same questions

thanks guys and gals!