Solved - Mysql Out of sort memory, consider increasing server sort buffer size
In this tutorial we will go over the demonstration of Out of sort memory. step by step explain consider increasing server sort buffer size mysql. you'll learn mysql 8 out of sort memory consider increasing server sort buffer size. i would like to show you out of sort memory consider increasing server sort buffer size ubuntu. Let's get started with Out of sort memory.
few days ago i was working on laravel project and when i run one following sql query, it was working on local mysql. but not working on ubuntu server in digitalocean. it tried to run using mysql command and i was able to found exactly error:
select * from `posts` where exists (select * from `categories` inner join `post_category` on `categories`.`id` = `post_category`.`category_id` where `posts`.`id` = `post_category`.`post_id` and `categories`.`slug` = 'phpexample.html') group by `posts`.`id` order by `posts`.`id` desc
i found following error:
ERROR 1038 (HY001): Out of sort memory, consider increasing server sort buffer size
i search on google and find out solution with increasing size of "sort_buffer_size". so let's open my.cnf file update as like bellow:
sudo nano /etc/mysql/my.cnf
update as following:
now you can restart mysql with following command:
sudo service mysql restart
I hope it can help you...
We are Recommending you
- How to Import Database in Mysql using Command Line in Ubuntu?
- Node JS Mysql Connection Example
- How to add 1 day to the date column in MySQL?
- MYSQL Query for Data between Two Dates Example
- How to Use MySQL View in Laravel?
- Angularjs PHP MySQL Pagination Example
- Column Sorting using PHP and MySQL
- How to get last executed mysql query in Laravel?
- Mysql procedure with pagination in laravel?
- Which MySQL datatype use for store an IP address?
- Mysql Hexadecimal color code store in binary datatype.