While accessing web configured with mysql 8 and php and you see the following error: CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client OR PHP Fatal error: Uncaught PDOException: PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] It maybe due to PHP devs might have not implemented the MySQL's 8.0 connection protocol ( auth with caching_sha2_password ) within the newer PHP versions. If you want to use mysql >= 8 and you dont care about caching_sha2_password, If you are running a fresh install of mysql 8, just select the second option as shown in the image. Otherwise, you need to configure MySQL 8.0 to run in mysql_native_password mode. As it can't configured in my.cnf, change the user profile as:- ALTER USER 'mysqlUsername'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mysqlUse
While running a script in Linux, if you encounter an error such as : /bin/sh^M: bad interpreter: No such file or directory The error is due to incorrect format of the script. Most probably when the script is created in Windows and transferred to Linux. The script might have a dos line ending file. The clue is the ^M Inorder to resolve this error: Open the script in Linux using vim editor, enter in vi command mode (key ESC), then type this: : set fileformat = unix Finally save it :x! or :wq! Thats it! Try running the script again and the error would have disappeared.
To send mail from Solaris, use this syntax echo "some text to send" | mailx -s "subject of email" recipient's@address Or, if you have body of email in some file: mailx -s "subject of email" recipient's@address < some_file.txt If you want to send mails with zip files of image files use the following formats: uuencode reports.tar.gz reports.tar.gz | mailx -s "My Report" you@domain.com uuencode office.jpeg office.jpeg | mail -s "Subject" you@domain.com If you need to send multiple attachments in single mail: $ uuencode r1.tar.gz r1.tar.gz > /tmp/out.mail $ uuencode r2.tar.gz r3.tar.gz >> /tmp/out.mail $ uuencode r3.tar.gz r3.tar.gz >> /tmp/out.mail $ cat email-body.txt >> /tmp/out.mail $ mail -s "Reports" you@domain.com < /tmp/out.mail
Comments
Post a Comment