cp: cannot create regular file '/home/root/.ipfs': No such file or directory - ipfs

I am trying to install Rubix Node in Linux. I already have jdk, and I had downloaded IPFS storage zip file and proceeded as per the instructions and I see .ipfs file created in the root directory as well, but error comes saying there is no such .ipfs file when I am trying to run start up script file after installing ZIP file related to IPFS Network:
./init.sh: 2: ipfs: Permission denied
cp: cannot create regular file '/home/root/.ipfs': No such file or directory
./init.sh: 4: ipfs: Permission denied
./init.sh: 5: ipfs: Permission denied
./init.sh: 6: ipfs: Permission denied
./init.sh: 7: ipfs: Permission denied
./init.sh: 8: ipfs: Permission denied
./init.sh: 9: ipfs: Permission denied
What might be causing the issue?

Seems like a permission issue. Once you are inside your Linux-SetupScript folder try:
chmod +x ./init.sh

Related

Docker container unable to comunicate with MySQL command line

I'm trying to install MySQL using a Dockerfile based on ubuntu. Before you say something: please, don't tell me to use a mysql image because I need to do it this way.
Edit: when I get into the container and execute mysql -u root it works perfectly. It's just that I can't do it though the dockerfile.
This is the Dockerfile code:
FROM ubuntu:latest
RUN apt update \
&& apt-get install mysql-server mysql-client mysql-common libmysqlclient-dev -y
RUN usermod -d /var/lib/mysql/ mysql
RUN service mysql start
RUN mysql -u root
RUN SELECT user,authentication_string,plugin,host FROM mysql.user \
&& ALTER USER 'root'#'localhost' IDENTIFIED WITH caching_sha2_password BY 'password' \
&& FLUSH PRIVILEGES \
&& exit
But I get this message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I also get these during the build, which seems a bit suspicious and might be related to the issue, so I let it here just in case it's helpful.
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of stop.
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Cannot stat file /proc/225/fd/0: Permission denied
Cannot stat file /proc/225/fd/1: Permission denied
Cannot stat file /proc/225/fd/2: Permission denied
Cannot stat file /proc/225/fd/3: Permission denied
Cannot stat file /proc/225/fd/4: Permission denied
Cannot stat file /proc/225/fd/5: Permission denied
Cannot stat file /proc/225/fd/6: Permission denied
Cannot stat file /proc/225/fd/7: Permission denied
Cannot stat file /proc/225/fd/8: Permission denied
Cannot stat file /proc/225/fd/9: Permission denied
Cannot stat file /proc/225/fd/10: Permission denied
Cannot stat file /proc/225/fd/11: Permission denied
Cannot stat file /proc/225/fd/12: Permission denied
Cannot stat file /proc/225/fd/13: Permission denied
Cannot stat file /proc/225/fd/14: Permission denied
Cannot stat file /proc/225/fd/15: Permission denied
Cannot stat file /proc/225/fd/16: Permission denied
Cannot stat file /proc/225/fd/17: Permission denied
Cannot stat file /proc/225/fd/18: Permission denied
Cannot stat file /proc/225/fd/19: Permission denied
Cannot stat file /proc/225/fd/20: Permission denied
Cannot stat file /proc/225/fd/21: Permission denied
Cannot stat file /proc/225/fd/22: Permission denied
Cannot stat file /proc/225/fd/23: Permission denied
Cannot stat file /proc/225/fd/24: Permission denied
Cannot stat file /proc/225/fd/25: Permission denied
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 883
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.

Unable to install and run MySQL properly when using downloaded zip

I have been trying to install MySQL from a direct zip and I've followed each step in this doc.
The FLUSH PRIVILEGES throws the error :
access denied you need (at least one of) the reload privilege(s) for this operation
I then tried : GRANT reload on . to 'root'#'localhost'. This gives the error :
Access denied for user ''#localhost;
Am not able to execute any query. Any help is really appreciated.

Fail to run mysql script for other user than root

I have mysql installed on ubuntu server. There is a mysql script that has a select statement in it. I want to output the result of this select into .csv file.
If I run the following command
mysql -u root -pTHIS_IS_PASS MY-SCHEMA < /home/me/script.sql
things work out beautifully. I, however, I run
mysql -u OTHER-USER -pTHIS_IS_PASS MY-SCHEMA < /home/me/script.sql
I get this error:
ERROR 1045 (28000) at line 7: Access denied for user 'OTHER-USER'#'localhost' (using password YES)
I have no escaping characters in the password of OTHER-USER.
How can I fix this?
Found out the solution myself: I needed to grant FILE permission to the OTHER-USER.
GRANT FILE ON *.* TO 'OTHER-USER'#'localhost';
Don't forget that file permission is granted not to just one schema, but to the whole mysql.

Can't start server: can't create PID file: Permission denied

I had install wamp on my win10 computer and when i start it, i get this error
2017-07-03 14:42:06 8324 [ERROR] wampmysqld: Can't create/write to
file 'c:\wamp\bin\mysql\mysql5.6.12\data\COM2.pid' (Errcode: 13 -
Permission denied)
2017-07-03 14:42:06 8324 [ERROR] Can't start
server: can't create PID file: Permission denied
It looks like you don't have persmission to write to: c:\wamp\bin\mysql\mysql5.6.12\data
Either logon with an administrator account or give persmission to write to this folder.

Unable to start SQL server

I just downloaded MySQL and I tried to run it, and it gives the following error:
Starting MySQL
./usr/local/Cellar/mysql/5.7.15/bin/mysqld_safe: line 135: /usr/local/var/mysql/<host_name>.err: Permission denied
/usr/local/Cellar/mysql/5.7.15/bin/mysqld_safe: line 169: /usr/local/var/mysql/<host_name>.err: Permission denied
/usr/local/Cellar/mysql/5.7.15/bin/mysqld_safe: line 135: /usr/local/var/mysql/<host_name>.err: Permission denied
ERROR! The server quit without updating PID file (/usr/local/var/mysql/<host_name>.pid).
I referred to other StackOverflow posts, but the solutions do not seem to work for me, not sure where I am going wrong.
Further details:
restarting gives me following error:
MySQL server PID file could not be found!
I tried deleting the .err file in usr/local/mysql/data but it did not help
I cannot see any PID file in usr/local/mysql
/usr/local/var/ directory does not exist
As you can see you have a Permission denied error this error tells you that Mysql service does not have the proper permissions in order to modify the contents of /usr/local/var/mysql
./usr/local/Cellar/mysql/5.7.15/bin/mysqld_safe: line 135: /usr/local/var/mysql/<host_name>.err: Permission denied
if you have created this path manually /usr/local/var/mysql/ make sure that its permission is mysql:mysql. you can change it using the following command:
chown mysql:mysql /usr/local/var/mysql/ -R