Home > mySQL troubleshooting > ERROR 1146 (42S02)

ERROR 1146 (42S02)

Today, I duplicate a production database for testing updating script. Once I apply the script, it shows  errors below. I am sure that all tables are existing.

mysql> source 1b2aScriptAlter.sql

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

ERROR 1146 (42S02): Table ‘socialMM.TEAM_USER’ doesn’t exist

ERROR 1146 (42S02): Table ‘socialMM.AUDIT_ACTIONS’ doesn’t exist

ERROR 1146 (42S02): Table ‘socialMM.MSGSTATE_0001’ doesn’t exist

ERROR 1146 (42S02): Table ‘socialMM.SIP_OFFLINE_MSG’ doesn’t exist

ERROR 1146 (42S02): Table ‘socialMM.PERSONAL_MESSAGES’ doesn’t exist

ERROR 1146 (42S02): Table ‘socialMM.PRIVILEGE’ doesn’t exist

ERROR 1146 (42S02): Table ‘socialMM.USERS’ doesn’t exist

ERROR 1146 (42S02): Table ‘socialMM.IM_ACCOUNTS’ doesn’t exist

ERROR 1146 (42S02): Table ‘socialMM.IM_ACCOUNTS’ doesn’t exist

ERROR 1146 (42S02): Table ‘socialMM.REALM_USER’ doesn’t exist

Finally, I compare the setting between my testing db and the production database. The variable “lower_case_table_names” in the production is set to “1”, but in my testing db default value is “0”. Finally, I see that default table_names is case sensitive. So that I set the variable to ‘1’ and restart the testing database. The errors are gone.

 

 

 

 

 

Advertisements
Categories: mySQL troubleshooting
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: