My application logs show "Prepared statement needs to be re-prepared" after running mysqltuner ( bother version 1.1 and 1.4 ). Once I run "flush tables;", the error goes away. I have looked online and most things mention mysqldump in relation to this error, but I am not running mysqldump. Not really doing anything, in fact. So a few questions related to this error:
- Any causes to this that are not related to mysqldump, generally speaking?
- Anyone else have this problem with mysqltuner?
- Does this suggest a deeper issue I need to look into?
my.conf:
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
# NOTE: server did not like over 2GB
innodb_buffer_pool_size=1GB
innodb_log_buffer_size=9M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
join_buffer_size = 2M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Recommended in standard MySQL setup
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
lower_case_table_names=1
character-set-server=utf8
query_cache_size=100M
query_cache_type=1
slow_query_log=ON
query_cache_limit = 10M
table_open_cache=164000
open_files_limit=328000
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Tell me if you need other information.
Edit 03/10/2015: I just did the following with no problems:
- Ran mysqldump to dump one database ( fully, with data and functions ) to "loadDB.sql" script for later use.
- Added new database
- Using "mysql < loadDB.sql", loaded my new database
- Updated and added rows to my new database I did not have any problems with the above.
So I only have a problem if I run mysqltuner. What I don't know is if
- mysqltuner is causing the problem, in which case I just either don't run mysqltuner ever, or immediately run "flush tables;" afterwards.
- there is a problem with my mysql configuration, which will cause me problems later and needs to be resolved.
- or there is some other problem source I have not considered yet The first step, and the reason for this post, is to determine if mysqltuner could cause this problem.
Thanks.