Category: MySQL

Increasing File Descriptors and Open Files Limit CentOS 7

Naveen Nayak September 17, 2015 4 Comments Linux, MySQL , ,

PS: See Andy Dyrcz answer in the comments for a better way to do this Some programs like Apache and MySQL require a higher number of file descriptors. This is how you can increase that limit for all users in CentOS 7 Commands require root access # Find the default limit – check the open files […]

Clear Screen for MySQL Command Prompt – Linux

Naveen Nayak June 18, 2014 No Comments MySQL, Tips and Tricks ,

On Linux, if you have logged into mysql on the command prompt  and want to clear all text on screen you can use mysql> \! clear \! system-command is the command format \! tells mysql to pass the command to the system Example [naveen@localhost ~]$ mysql -u root -p Enter password: Welcome to the MySQL monitor. […]

MySQL convert to utf8

Naveen Nayak July 31, 2013 No Comments MySQL

A quick way to convert your database to utf8 # Dump the old database as latin1, mysqldump defaults to utf8 mysqldump -h host -u user -p –default-character-set=latin1 old_db > dump.sql # Rewrite the dump to say ‘utf8’ and ‘utf8_general_ci’ sed -e ‘s/SET NAMES latin1/SET NAMES utf8/g’ -i dump.sql sed -e ‘s/DEFAULT CHARACTER SET latin1/DEFAULT CHARACTER […]

mysqldump: Got packet bigger than ‘max_allowed_packet’ bytes

Naveen Nayak October 27, 2010 No Comments MySQL

If you get this error then you need to change the max_allowed_packet size in my.cnf  in the [mysqldump] section [mysqldump] max_allowed_packet = 500M The maximum size as of Mysql 5.1 is 1024 MB This works fine if you are on the localhost and are using mysqldump from the local host However, if you are trying […]

Page 1 of 2