How to edit my.cnf

To edit a file, first make a back-up.

cp /etc/my.cnf /etc/my.cnf.old

Now open it in nano:

nano /etc/my.cnf

Use the arrows to navigate around. Or:
CTRL-W brings up a search box, type in the value you are looking for and hit enter.
CTRL-V is page down
CTRL-Y is page up
CTRL-K deletes the line the cursor is on
CTRL-X to exit... if you want to save the changes you have made, hit Y. If you don't want to save your changes (like if you made a dastardly mistake, which I do often) hit N. You can always go back into nano again and re-try at making the changes correctly.

Once you are done,

Restart MYSQL:

/etc/init.d/mysql restart

Your changes will now take effect.
  • 19 Users Found This Useful
Was this answer helpful?

Related Articles

Run OPTIMIZE TABLE to defragment tables for better performance

For this suggestion:Run OPTIMIZE TABLE to defragment tables for better performanceRun this...

How to clear Error Log of a cPanel Account.

User the below code to clear Error Log:Replace User with Username:Code:for i in `find...

What is php.ini ?

The php.ini file and changing PHP Settings The php.ini file is a special file for PHP and...

How to fix ini_set() has been disabled for security reasons

1. Create php.ini file inside your public_html folder, OR the folder in which you have...

How to fix Fatal error: Uncaught exception 'Exception' with message 'DateTimeZone:

1: Create .htaccess file inside your public_html folder, OR the folder in which you have...