Mostrando postagens com marcador mariadb. Mostrar todas as postagens
Mostrando postagens com marcador mariadb. Mostrar todas as postagens

segunda-feira, 22 de fevereiro de 2016

variable performance schema is a read only variable MARIADB

When trying to change PERFORMANCE_SCHEMA variable to start Performance Schema in a MariaDB instance ina CentOS platform, I got the following message:

  "variable performance schema is a read only variable"

After some googling, I got to the MariaDB documentation about Performance Schema, where it says:

  "The performance schema cannot be activated at runtime - it must be set when the server starts by     adding the following line in your my.cnf configuration file."

On linux I just used nano to edit the my.cnf file, typing:

  nano /etc/my.cnf

I just added the "performance_schema=on" tag on the mysqld section, and saved the file. After that, a service restart should do the trick:

  systemctl restart mariadb

Cheers!

Check out my new book about R Language http://www.amazon.com/dp/B00SX6WA06

quinta-feira, 28 de janeiro de 2016

Automatic MySQL backups on CentOS 7

You can create automatic backups for MySQL on CentOS 7, by creating a shell script and adding it to /etc/cron.daily folder. This way, your script will be executed daily as a cron job.

Here is the script to your .sh shell script:

nano bkup.sh
mysqldump -uroot -pyourpswd yourdatabasenamehere > /home/youruser/db.$(date +%a.%H:%M).dump

You need to set the permissions to it:
chmod 700 bkup.sh

And there you go!

Don't forget to check your backups from time to time... =)




Check out my new book about R Language http://www.amazon.com/dp/B00SX6WA06

sexta-feira, 22 de janeiro de 2016

Install MariaDB on CentOS 7

I had a bit of a hassle to install MariaDB on CentOS. After Googling it a bit, I found this link at Digital Ocean. I will detail what I did, but it's almos all there.


  • yum -y install mariadb-server mariadb
  • systemctl start mariadb.service
  • systemctl enable mariadb.service
  • mysql_secure_installation


At the last step you can basically type enter on all options, except on the root password setting that you need to provide.

Cheers!


Check out my new book about R Language http://www.amazon.com/dp/B00SX6WA06

quinta-feira, 18 de setembro de 2014

quarta-feira, 17 de setembro de 2014

terça-feira, 16 de setembro de 2014

segunda-feira, 15 de setembro de 2014

quinta-feira, 11 de setembro de 2014

quarta-feira, 10 de setembro de 2014

segunda-feira, 8 de setembro de 2014