Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-27, 22:43:28

Author Topic: MySQL Error  (Read 3796 times)

0 Members and 1 Guest are viewing this topic.

Offline sandipcd

  • Senior Member
  • *
  • Posts: 167
  • Karma: +0/-0
    • View Profile
MySQL Error
« on: 2015-04-27, 19:28:18 »
I am upload a Drupal Database in mysql and getting error related to max_allowed_packet.

So how can I increase max_allowed_packet for Mysql?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: MySQL Error
« Reply #1 on: 2015-04-28, 04:19:56 »
Try place your .sql file in /tmp and then export with select '/tmp'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline sandipcd

  • Senior Member
  • *
  • Posts: 167
  • Karma: +0/-0
    • View Profile
Re: MySQL Error
« Reply #2 on: 2016-04-14, 11:55:19 »
I have tried uploading file in /tmp folder and then import it to phpmyadmin. But still in phpmyadmin is showing error that "#1153 - Got a packet bigger than 'max_allowed_packet' bytes ".

I have run command in putty "mysql --help |grep packet" and found that 'max_allowed_packet' is 16MB. My server has CentOS 6 - 1GB RAM.

Any idea how to solve this problem?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: MySQL Error
« Reply #3 on: 2016-04-14, 12:03:32 »
Add 'max_allowed_packet=32M' under '[mysqld]' in /etc/my.cnf (for Kloxo-MR 6.5) or /etc/my.cnf.d/server.cnf. And then restart with 'sh /script/restart-mysql -y'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline sandipcd

  • Senior Member
  • *
  • Posts: 167
  • Karma: +0/-0
    • View Profile
Re: MySQL Error
« Reply #4 on: 2016-04-14, 12:09:55 »
I have Kloxo-MR version 7? Is the file will be different?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: MySQL Error
« Reply #5 on: 2016-04-14, 12:38:48 »
I have Kloxo-MR version 7? Is the file will be different?
For MariaDB (in Kloxo-MR 7), /etc/my.cnf just content link/include to files inside /etc/my.cnf.d/server.cnf.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline sandipcd

  • Senior Member
  • *
  • Posts: 167
  • Karma: +0/-0
    • View Profile
Re: MySQL Error
« Reply #6 on: 2016-04-14, 12:46:57 »
I have Mysql table of drupal CMS, table name - cache_form and it size is 140 MB.
Is 'max_allowed_packet=32M' will be sufficient for this?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: MySQL Error
« Reply #7 on: 2016-04-14, 12:49:11 »
I have Mysql table of drupal CMS, table name - cache_form and it size is 140 MB.
Is 'max_allowed_packet=32M' will be sufficient for this?
max_allowed_packed not related to how big your table. Try increasing this value step-by-step.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline sandipcd

  • Senior Member
  • *
  • Posts: 167
  • Karma: +0/-0
    • View Profile
Re: MySQL Error
« Reply #8 on: 2016-04-14, 13:45:44 »
Now the database has been imported in phpmyadmin.
But what 'max_allowed_packed' is all about ? What restriction it has and what should I keep in mind to avoid overload the 'max_allowed_packed' ?

-------------------------
I have written 'max_allowed_packed=32M' in /etc/my.cnf.d/server.cnf. But when I am trying to see it in SSH by giving command 'mysql --help |grep packet' - it is showing 16777216 (16MB). So, is it really change or not. How can I confirm this?

-------------------------
When I am writing 'max_allowed_packed=32M' in /etc/my.cnf, the Kloxo-MR panel showing error. What is the reason?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: MySQL Error
« Reply #9 on: 2016-04-14, 13:56:33 »
Now the database has been imported in phpmyadmin.
But what 'max_allowed_packed' is all about ? What restriction it has and what should I keep in mind to avoid overload the 'max_allowed_packed' ?

-------------------------
I have written 'max_allowed_packed=32M' in /etc/my.cnf.d/server.cnf. But when I am trying to see it in SSH by giving command 'mysql --help |grep packet' - it is showing 16777216 (16MB). So, is it really change or not. How can I confirm this?

-------------------------
When I am writing 'max_allowed_packed=32M' in /etc/my.cnf, the Kloxo-MR panel showing error. What is the reason?
Did you restart mysql/mariadb after change their config?.

As I said before, because using Kloxo-MR 7, change at /etc/my.cnf.d/server.cnf instead /etc/my.cnf.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline sandipcd

  • Senior Member
  • *
  • Posts: 167
  • Karma: +0/-0
    • View Profile
Re: MySQL Error
« Reply #10 on: 2016-04-14, 14:07:34 »
Yes, I have given command 'sh /script/restart-mysql -y' to restart mysql. How do I restart Mariadb?
After giving this command still I got 16777216 (16MB). Any idea?

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: MySQL Error
« Reply #11 on: 2016-04-14, 14:33:20 »
Running 'mysql --help|grep packet' just inform 'default' value (not real value).

To know real value, run 'mysql -u root -pYOURMYSQLROOTPASSWORD' and then input "SHOW VARIABLES LIKE 'max_allowed_packet';"
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.059 seconds with 20 queries.

web stats analysis