Posted on 18-08-2010, 20:13, by edo, under
Linux,
MySQL.
Slightly modified MySQL backup script. This one uses mysqlhotcopy. It only locks the tables for 1 or 2 seconds (every two hours in cron). Then it copies the database MyISAM files. These files then are being archived and compressed, and copied to NAS using SMB. Advantage of this new principle is that MySQL is only [...]
To stress test our servers we’re benchmarking them. By monitoring both the webservers and database we can tune our setup and see where the performance bottleneck is located. To properly test the website we need to take a “snapshot” from the requests that are performed on the webservers. To do that, we make a log [...]
Posted on 28-02-2008, 21:10, by edo, under
Linux,
MySQL.
Quick code overview to compile a debian mysql5 server package, and to install it. ?View Code BASH1 2 3 4 5 6 7 apt-get install libdbi-perl libdbd-mysql-perl apt-get build-dep mysql-server apt-get -b source mysql-server dpkg -i mysql-common_..all.deb dpkg -i mysql-client-..i386.deb dpkg -i mysql-server-..i386.deb mysqladmin -u root password ‘yourpassword’ It might also be required to integrate [...]
Posted on 27-02-2008, 21:40, by edo, under
Linux,
MySQL.
Quick way to do this via commandline: export: ?View Code BASH1 mysqldump -u Username -pPassword DatabaseName > DatabaseName_backup.sql import: ?View Code BASH1 mysql -u Username -pPassword DatabaseName < DatabaseName_backup.sql
Posted on 27-02-2008, 21:38, by edo, under
MySQL.
Sometimes it’s easy to create a database without any specific permissions, to test some scripts on. The way to do this is: ?View Code BASH1 2 3 4 CREATE USER ‘testuser’@'localhost’ IDENTIFIED BY ‘pass’; GRANT USAGE ON * . * TO ‘testuser’@'localhost’ IDENTIFIED BY ‘pass’; CREATE DATABASE IF NOT EXISTS `testDB` ; GRANT ALL PRIVILEGES [...]