MySQL console error unknown option '--root' - mysql

When I try to access mysql in the command line get the following error:
mysql: unknown option '--root'
Mysql is installed via brew, version 5.6.27, OSX El Capitan with SIP turned off.

This is an old thread however, it can help someone. I came up with the same issue then later I have discovered that there was a wrong entry in .my.cnf file in my home folder. You probably have a wrong entry on your
/root/.my.cnf or .my.cnf
file on your home directory.
Renaming the file will help you solve the issue.

I had such error (but with message "mysql: unknown option --mysqld]") when forgot opening '[' symbol in /etc/mysql/my.cnf, It was looking like:
mysqld] #<-- forgot opening [
innodb-file-format=barracuda
innodb-file-per-table=1
...
Check this! (thanks to Siru, found in a moment!)

Related

Can you help me to fix the connection with my DBeaver?

I don't speak English, sorry.
I have this message to my DBeaver
Can you help me to fix the problem ?
Network error
Motif:
Network unavailable:
javax.net.ssl.SSLHandshakeException:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
There are to ways to solve your problem.
1 - Check this link: ( https://dbeaver.com/docs/wiki/Importing-CA-Certificates-into-DBeaver/ ) and follow the steps.
2 - In DBeaver installation path, open the dbeaver.ini file and remove this line: -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT
I did the same step, and did not work, but then I changed the SSL Factory to org.postgresql.ssl.LibPQFactory and it works.
I have similar error the first time that i open a DB:
Network error
Reason: Network unavailable due to certificate issue. Try changing the
setting Use Windows trust store in Preferences->Connections and
restart DBeaver. It might help if you haven't overridden trust store.
javax.net.ssl.SSLHandshakeException:PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
I try 'bAsK' solution but not work for me.
The solution for me is remove check in the setting Use Windows trust store in Preferences->Connections and restart DBeaver
I also installed JRE 8 (Java)
for mac OS , just edit the file
/Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini
and add the below line to the file
-Djavax.net.ssl.trustStoreType=KeychainStore
Restart the DBeaver application to resolve this problem.

Fedora 33 openjdk 8 error showing on terminal

I am getting below error whenever I open the terminal. This began happening after upgrading Fedora Workstation 32 to 33.
ERROR: ld.so: object '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.265.b01-1.fc32.x86_64/jre/lib/amd64/libzip.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I still have OpenJDK 8 installed and even when uninstalled, above error keeps popping up making my terminal untidy
The answer here helped me to get a solution. I had the below the line in .bash_profile
./home/admin/Adempiere/postgresql/8.1.5/PGSQL.env
. I simply commented it out as below and my issue was solved. Read the above answer for the details of why this caused me issues. In my case, the program "Adempiere" had been uninstalled but it didn't remove this path which no longer existed.
#./home/admin/Adempiere/postgresql/8.1.5/PGSQL.env
If you get any error related to the above, review paths set in your .bash_profile
or /.bashrc , if you have a missing path; definitely this will throw this error

MySQL MHA binlog setting check failed

i try to config MHA 0.56 for mysql 5.7, everything is done. when i run masterha_check_repl, i get the following message:
executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/data/mysql --output_file=/data/mysql
Failed to save binary log: Set --start_file=<starting_binlog_filename> or --binlog_prefix=<binlog_file_prefix>
Binlog setting check failed!
I modified MasterMonitor.pm added
--binlog_prefix=mysql-bin
into the command , but it doesn't work, still gave me above error message.
I have no idea on how to deal with it..
Try setting binlog_prefix in my.cnf rather than via command line.
I made a mistake when I copied other's app1.cnf explanation into my app1.cnf.
The #comment after parameters in the same line should be removed.

The error I am getting is as follows: /usr/sbin/ejabberdctl: line 428: 4052 Segmentation fault $EXEC_CMD "$CMD"

Having trouble creating opensrf users during the configuration stage in the command line. The error I am getting is as follows:
/usr/sbin/ejabberdctl: line 428: 4052 Segmentation fault $EXEC_CMD "$CMD"
This seems to be related to AppArmor. There's a comment on bugs.launchpad.net which resolved the issue for me, I quote:
To solve the error, I opened the apparmor configuration file:
nano /etc/apparmor.d/usr.sbin.ejabberdctl
Found the string:
/bin/su r,
And changed it by adding m:
/bin/su rm,
Restarted apparmor:
sudo service apparmor restart
Credit : Viacheslav Hapon
The answer given by yerforkferchips is working, BUT if you are facing this problem, it means you are running ejabberd 16.XX which has other known bugs you will encounter.
I would recommend updating to the lastest version, otherwise you might waste precious days as I just did.

Unable to set up php MessDetector in PhpStorm on mac. #echo: command not found

I've installed phpmd and I'm trying to set up PhpStorm with it. When I add the path to the phpmd.bat file in PhpStorm "Settings | PHP | Mess Detector" and press validate I get the following error:
PHP Mess Detector
phpmd: /Applications/MAMP/htdocs/rentatool/vendor/phpmd/phpmd/src/bin/phpmd.bat:
#echo: command not found /Applications/MAMP/htdocs/rentatool/vendor/phpmd/phpmd/src/bin/phpmd.bat:
REM: command not found /Applications/MAMP/htdocs/rentatool/vendor/phpmd/phpmd/src/bin/phpmd.bat:
syntax error near unexpected token `(' /Applications/MAMP/htdocs/rentatool/vendor/phpmd/phpmd/src/bin/phpmd.bat:
`REM Copyright (c) 2008-2012, Manuel Pichler .'
I've installed phpmd with composer:
"require-dev": {
"phpmd/phpmd": "2.0.*"
}
and I'm running on Mac.
I found a chat were a person was having the same problem and solved it but I wasn't able to solve it the same way https://chat.stackexchange.com/transcript/6/2014/7/11
Any ideas to where the problem lies are greatly appreciated.
It worked when I set the path to the phpmd exec file instead of to the .bat file.