Quantcast
Channel: AskApache
Viewing all articles
Browse latest Browse all 34

View all MySQL Variables for Pasting into my.cnf

$
0
0

mysql-variables-my-cnf-fileThis is really useful for me because I work with dozens of different database servers. The first thing I do is run this command and paste it into the servers /etc/my.cnf file. That way I will always know the original value and it just makes life much easier.

$ mysql -NBe 'SHOW VARIABLES' |sed 's,\t,^=,'|column -ts^|tr "\n" '@'|eval $(echo "sed '" "s,@\("{a..z}"\),\n\n\1,;" "'")|tr '@' "\n"|sed 's,^,# ,g'

View all MySQL Variables for Pasting into my.cnf from AskApache


Viewing all articles
Browse latest Browse all 34

Trending Articles