View Full Version : Mysql Setting - how do I change it??
Lulubelle
12-12-2008, 01:23 PM
Hi
I'm pretty sure that this has been asked already but done a search and couldn't find anything in the forums.
I have a max_allowed_packets error when uploading attachments.
I have googled my heart out trying to find out how to change this. When I follow the directions given it doesn't work.
I SSH onto my server and type a mysql command - tried this but it came back with an authentication error despite using the root login.
I change the my.cnf file in the /etc folder manually by editing it in notepad++ - which is something else suggested but there is no setting in that file for max packet upload.
I am not technical but I do need to change this setting myself, can someone give me an idiot proof way of doing this please?
Help would be very much appreciated :)
Lynne
12-12-2008, 02:28 PM
If it wasn't in the my.cnf file, then you just need to add it like this:
max_allowed_packet = 64M
(Change 64M to what you want.) You need to restart mysql after you do the change.
SEOvB
12-12-2008, 02:57 PM
Hi
I'm pretty sure that this has been asked already but done a search and couldn't find anything in the forums.
I have a max_allowed_packets error when uploading attachments.
I have googled my heart out trying to find out how to change this. When I follow the directions given it doesn't work.
I SSH onto my server and type a mysql command - tried this but it came back with an authentication error despite using the root login.
I change the my.cnf file in the /etc folder manually by editing it in notepad++ - which is something else suggested but there is no setting in that file for max packet upload.
I am not technical but I do need to change this setting myself, can someone give me an idiot proof way of doing this please?
Help would be very much appreciated :)
Don't edit system files in notepad++ or notepad or anything like that, most of them can save extra characters or cause errors in the files.
Use nano or pico to edit the files, and make sure to back them up first before making changes.
cp my.cnf my.cnf.bak
Then when you restart mySQL if you have errors, you can simply copy the old working one back over the broken one with
cp my.cnf.bak my.cnf
Lynne gave the correct code for changing the setting you need to change ;) so good luck.
Lulubelle
12-12-2008, 07:23 PM
Thanks for the help guys, my.cnf file did read:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
It now reads:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
max_allowed_packet = 1028M
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
is this ok?
Lynne
12-12-2008, 09:38 PM
That is the correct format for adding in the max_allowed_packet setting.
Marco van Herwaarden
12-15-2008, 07:26 AM
1028 MB might be too much.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.