Unable to remove a container using machinectl - containers

I pulled a nixos container and now want to remove it.
I enter:
sudo machinectl remove nixos-21-tar
But the return message is:
Could not remove image: Access denied
If I list the images I get:
$ machinectl list-images
NAME TYPE RO USAGE CREATED MODIFIED
debian directory no n/a n/a n/a
nixos-21-tar directory no n/a n/a n/a
EDIT:
I think the image has been corrupted and the owner/group is wrong:
sudo tree /var/lib/machines/nixos-21-tar/
/var/lib/machines/nixos-21-tar/
└── var
└── empty
sudo ls -alR /var/lib/machines/nixos-21-tar/
/var/lib/machines/nixos-21-tar:
total 12
drwxrwxrwx 3 699334656 699334656 4096 Apr 18 18:38 .
drwxrwxrwx 4 root root 4096 Apr 21 17:23 ..
drwxrwxrwx 3 699334656 699334656 4096 Apr 18 18:38 var
/var/lib/machines/nixos-21-tar/var:
total 12
drwxrwxrwx 3 699334656 699334656 4096 Apr 18 18:38 .
drwxrwxrwx 3 699334656 699334656 4096 Apr 18 18:38 ..
dr-xr-xr-x 2 root root 4096 Mar 11 17:29 empty
/var/lib/machines/nixos-21-tar/var/empty:
total 8
dr-xr-xr-x 2 root root 4096 Mar 11 17:29 .
drwxrwxrwx 3 699334656 699334656 4096 Apr 18 18:38 ..

Related

Can't connect to local MySQL Server with homebrew

I have installed the MySQL-Server with homebrew before on another User on my Macbook Pro, but I must change the User and now I can't start the MySQL server:
$ mysql.server start
Starting MySQL
./usr/local/Cellar/mysql/5.7.22/bin/mysqld_safe: line 144:
/usr/local/var/mysql/Stefans-MacBook-Pro.local.err: Permission denied
/usr/local/Cellar/mysql/5.7.22/bin/mysqld_safe: line 144:
/usr/local/var/mysql/Stefans-MacBook-Pro.local.err: Permission denied
/usr/local/Cellar/mysql/5.7.22/bin/mysqld_safe: line 198:
/usr/local/var/mysql/Stefans-MacBook-Pro.local.err: Permission denied
/usr/local/Cellar/mysql/5.7.22/bin/mysqld_safe: line 144:
/usr/local/var/mysql/Stefans-MacBook-Pro.local.err: Permission denied
ERROR! The server quit without updating PID file
(/usr/local/var/mysql/Stefans-MacBook-Pro.local.pid).
The User "Stefan" doesn't exist anymore. Maybe the rights on /usr/local/var/mysql are not correct, but I am unsure about what I can do to fix it.
The rights are:
$ sudo ls -lah /usr/local/var/mysql/
Password:
total 221392
drwxr-xr-x 20 501 admin 640B 25 Apr 15:47 .
drwxrwxr-x 8 501 admin 256B 20 Apr 10:12 ..
-rw-r----- 1 501 admin 60K 25 Apr 15:47 Stefans-MacBook-Pro.local.err
-rw-r----- 1 501 admin 56B 20 Apr 10:12 auto.cnf
-rw------- 1 501 admin 1,6K 20 Apr 10:12 ca-key.pem
-rw-r--r-- 1 501 admin 1,1K 20 Apr 10:12 ca.pem
-rw-r--r-- 1 501 admin 1,1K 20 Apr 10:12 client-cert.pem
-rw------- 1 501 admin 1,6K 20 Apr 10:12 client-key.pem
-rw-r----- 1 501 admin 464B 25 Apr 15:47 ib_buffer_pool
-rw-r----- 1 501 admin 48M 25 Apr 15:47 ib_logfile0
-rw-r----- 1 501 admin 48M 20 Apr 10:12 ib_logfile1
-rw-r----- 1 501 admin 12M 25 Apr 15:47 ibdata1
drwxr-x--- 77 501 admin 2,4K 20 Apr 10:12 mysql
drwxr-x--- 90 501 admin 2,8K 20 Apr 10:12 performance_schema
-rw------- 1 501 admin 1,6K 20 Apr 10:12 private_key.pem
-rw-r--r-- 1 501 admin 452B 20 Apr 10:12 public_key.pem
-rw-r--r-- 1 501 admin 1,1K 20 Apr 10:12 server-cert.pem
-rw------- 1 501 admin 1,6K 20 Apr 10:12 server-key.pem
drwxr-x--- 108 501 admin 3,4K 20 Apr 10:12 sys
drwxr-x--- 25 501 admin 800B 20 Apr 12:00 textspinner
I have also tried to reinstall MySQL server but it doesn't work.
How can I fix this?
Ok, with this post i could fix this:
https://coderwall.com/p/os6woq/uninstall-all-those-broken-versions-of-mysql-and-re-install-it-with-brew-on-mac-mavericks

Recover mysql using data folder

One of our MySQL servers died but somehow we were able to recover all the files from it. This server was a slave at one time however we stopped it being a slave so we could use it for housekeeping tasks and reports, etc.
Can someone tell me how to recover with this?
I now have these files and a backup of my.cnf
ll /root/home/recovered/mysql/
-rw-r----- 1 root root 117 Jun 1 09:30 rabney-relay-bin.000001
-rw-r----- 1 root root 26 Jun 1 09:30 rabney-relay-bin.index
-rw-r----- 1 root root 113055367168 Jun 1 10:42 ibdata1
-rw-r----- 1 root root 1073741824 Jun 1 09:33 ib_logfile0
-rw-r----- 1 root root 1073741824 Jun 1 09:33 ib_logfile1
drwx------ 2 root root 4096 Jun 1 09:30 mysql
drwx------ 2 root root 16384 Jun 1 09:30 production_copy
-rw-r----- 1 root root 3253518648 Jun 1 09:32 slowquery.log
drwx------ 2 root root 4096 Jun 1 09:30 test
I've been reading articles on Google regarding this but not sure how to do it yet.

MediaWiki - Bootstrap Skin Not Rendering

I have a fresh install of MediaWiki setup. I have installed the Bootstrap Skin however it doesn't seem to be rendering anything out.
This is the path to my skins directory
/var/www/wiki/skins
Inside this I have the following
4 drwxrwxrwx 4 root root 4096 2015-07-30 15:33 CologneBlue
4 drwxrwxrwx 7 root root 4096 2015-07-31 10:36 mediawiki-bootstrap
4 drwxrwxrwx 4 root root 4096 2015-07-30 15:33 Modern
4 drwxrwxrwx 3 root root 4096 2015-07-30 15:33 MonoBook
4 -rwxrwxrwx 1 root root 1288 2015-07-30 15:33 README
4 drwxrwxrwx 6 root root 4096 2015-07-30 15:33 Vector
Inside the mediawiki-bootstap folder is the following
4 drwxrwxrwx 2 root root 4096 2015-07-31 10:36 assets
4 drwxrwxrwx 7 root root 4096 2015-07-31 10:37 bootstrap
4 -rwxrwxrwx 1 root root 524 2015-07-31 10:36 Bootstrap.i18n.php
4 -rwxrwxrwx 1 root root 2271 2015-07-31 10:36 bootstrap.php
12 -rwxrwxrwx 1 root root 9274 2015-07-31 10:36 Bootstrap.renderer.php
4 -rwxrwxrwx 1 root root 3751 2015-07-31 10:36 Bootstrap.skin.php
4 -rwxrwxrwx 1 root root 759 2015-07-31 10:36 DOMDebugPrinter.php
4 drwxrwxrwx 8 root root 4096 2015-07-31 10:37 Font-Awesome
20 -rwxrwxrwx 1 root root 18092 2015-07-31 10:36 LICENSE.txt
8 -rwxrwxrwx 1 root root 5131 2015-07-31 10:36 README.md
4 drwxrwxrwx 2 root root 4096 2015-07-31 10:36 xsl
I have added the following to my LocalSettings.php file located in the wiki folder
require_once( "/var/www/wiki/skins/mediawiki-bootstrap/bootstrap.php");
$wgDefaultSkin = "bootstrap";
#$wgDefaultSkin = "modern";
When I change back to modern, the styling and CSS loads fine. When I move to bootstrap the page loads with no styling/formatting.
I was wondering if anybody had any suggestion why this is not working for me.
Thanks

export result of the query with INTO OUTFILE

I don't find the exported file into /tmp folder. Where MYSQL export that file ?
mysql> SELECT oid,t FROM mytable INTO OUTFILE '/tmp/bbb.txt' CHARACTER SET latin1 FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\r\n';
ERROR 1086 (HY000): File '/tmp/bbb.txt' already exists
mysql> \q
Bye
usr#locahost:/tmp$ ls -l /tmp
total 210308
-rw------- 1 jetty jetty 0 Feb 27 2014 31020.jsvc_up
-rw------- 1 root root 2210 Dec 13 2013 apticron.hFScRvN3T6
drwxr-xr-x 2 root root 4096 May 25 2014 graphs
srwxr-xr-x 1 root root 0 Aug 6 2014 haproxy.socket
drwx------ 2 jetty jetty 4096 Feb 27 2014 hsperfdata_jetty
drwxr-xr-x 2 root root 4096 Jun 16 04:45 hsperfdata_root
drwx------ 2 usr users 4096 Jul 15 03:36 mc-usr
-rw-r--r-- 1 root root 64 Jul 5 15:18 puppet_failures
-rw-r--r-- 1 usr users 64 Jul 15 03:29 puppet_failures00
usr#locahost:/tmp$

Does GT.M save database operation command in logs file

I see that have some logs file create by gt.m but just only about mupip rundown or recover information
> root#localhost:/tmp/fis-gtm/V6.2-002_x86_64# ll total 68 drwxrwxrwt 2
> root root 4096 Jul 14 16:22 ./ drwxr-xr-x 3 root root 4096 Jul 13
> 14:32 ../
> -rw-r--r-- 1 root root 0 Jul 13 14:33 root_20150713073215UTC-20150713073319UTC_mupip_rundown
> -rw-r--r-- 1 root root 278 Jul 13 14:32 root_20150713073215UTC_mupip_recover
> -rw-r--r-- 1 root root 0 Jul 14 11:11 root_20150713073407UTC-20150714041129UTC_mupip_rundown
> -rw-r--r-- 1 root root 278 Jul 13 14:34 root_20150713073407UTC_mupip_recover
> -rw-r--r-- 1 root root 278 Jul 14 09:46 root_20150714024647UTC_mupip_recover
> -rw-r--r-- 1 root root 0 Jul 14 09:49 root_20150714024820UTC-20150714024941UTC_mupip_rundown
> -rw-r--r-- 1 root root 278 Jul 14 09:48 root_20150714024820UTC_mupip_recover
> -rw-r--r-- 1 root root 77 Jul 14 09:55 root_20150714025001UTC-20150714025500UTC_mupip_rundown
> -rw-r--r-- 1 root root 291 Jul 14 09:50 root_20150714025001UTC_mupip_recover
> -rw-r--r-- 1 root root 0 Jul 14 10:03 root_20150714030230UTC-20150714030331UTC_mupip_rundown
> -rw-r--r-- 1 root root 311 Jul 14 10:02 root_20150714030230UTC_mupip_recover
> -rw-r--r-- 1 root root 0 Jul 14 14:35 root_20150714030424UTC-20150714073509UTC_mupip_rundown
> -rw-r--r-- 1 root root 260 Jul 14 10:04 root_20150714030424UTC_mupip_recover
Where do I find logs about GTM command like : SET ^,WRIRE....?
Normal commands (Set, Write) are part of the core programming language and are not logged; they are journalled if they read or write something to disk. The question is what are you looking for?