Tuesday, August 12, 2014

enable ssh on mac os x

SSH access by users is controlled by the local copy of Directory Services. (Controlled using dscl)
First off run dscl . list /Groups | grep 'access_ssh'. If the returned value says com.apple.access_ssh-disabled then all users have SSH access. If not, then we need to give the user access.
To add the user you need to run:
sudo dscl . append /Groups/com.apple.access_ssh user USERNAME
(replace USERNAME with the short username of the user) as well as:
sudo dscl . append /Groups/com.apple.access_ssh groupmembers `dscl . read /Users/USERNAME GeneratedUID | cut -d " " -f 2`
(replace USERNAME with short username as well)

taken from:
http://superuser.com/questions/166179/how-to-enable-remote-access-for-another-account-on-mac-remotely-via-ssh

Tuesday, June 17, 2014

InnoDB: Completed initialization of buffer pool InnoDB: Error: checksum mismatch in data file ./ibdata1

untuk menangani:
131104 11:17:16 InnoDB: Completed initialization of buffer pool InnoDB: Error: checksum mismatch in data file ./ibdata1 131104 11:17:16 InnoDB: Could not open or create data files
maka dilakukan
mysqld_safe  --innodb_force_recovery 4
diambil dari 
http://lifeandshell.com/mysql-innodb-error-checksum-mismatch/

Saturday, January 18, 2014

Finding out largest tables on MySQL Server

mysql> SELECT CONCAT(table_schema, '.', table_name),
    ->        CONCAT(ROUND(table_rows / 1000000, 2), 'M')                                    rows,
    ->        CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G')                    DATA,
    ->        CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G')                   idx,
    ->        CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size,
    ->        ROUND(index_length / data_length, 2)                                           idxfrac
    -> FROM   information_schema.TABLES
    -> ORDER  BY data_length + index_length DESC

    -> LIMIT  10;

taken from: http://www.mysqlperformanceblog.com/2008/02/04/finding-out-largest-tables-on-mysql-server/

Sunday, January 05, 2014

rapalan mysql akbar :D

mysqlcheck --all-databases -r #repair
mysqlcheck --all-databases -a #analyze
mysqlcheck --all-databases -o #optimize