
Hi, Thank you so much! I remove apostrophs, and reset password without ‘!’, it work completely correct. Thank you! 发件人: Label via Boost-users<mailto:boost-users@lists.boost.org> 发送时间: 2019年10月16日 16:06 收件人: boost-users@lists.boost.org<mailto:boost-users@lists.boost.org> 抄送: Label<mailto:label@eb-soft.de> 主题: Re: [Boost-users] Help needed with boost::process::child and mysql cli Hello, Date: Tue, 15 Oct 2019 07:28:54 +0000 From: name name <jerry-dev@outlook.com><mailto:jerry-dev@outlook.com> To: "boost-users@lists.boost.org"<mailto:boost-users@lists.boost.org> <boost-users@lists.boost.org><mailto:boost-users@lists.boost.org> Subject: [Boost-users] Help needed with boost::process::child and mysql cli Message-ID: <MN2PR01MB5710C3F35D092D2FDF0B376DF0930@MN2PR01MB5710.prod.exchangelabs.com><mailto:MN2PR01MB5710C3F35D092D2FDF0B376DF0930@MN2PR01MB5710.prod.exchangelabs.com> Content-Type: text/plain; charset="windows-1252" Hi, Im use boost::process::child to create a mysql cli child process to import sql file. Normally im use this command: /usr/bin/mysql mysql -h127.0.0.1 -utestuser --password='!@#QWE123qwe' -P3306 --default-character-set=utf8mb4 --max-allowed-packet=1GB < /root/create_db.sql It?s worked well in bash. But when use boost::process::child, std_err report ERROR 1045 (28000): Access denied for user 'testuser'@'localhost' (using password: YES). Is there any bugs in my code? [...] I have no experience with boost::process, only one idea: Maybe the apostrophs around the password are normally eaten by the Linux shell, and you have to leave them out when building your arguments? // connection info args.push_back("-h127.0.0.1"); args.push_back("-utestuser"); args.push_back("--password=!@#QWE123qwe"); // <= args.push_back("-P3306"); Freundliche Grüße * Best regards * Met vriendelijke groeten * Meilleures salutations Holger Gerth _________________________________________________________________________________ EB-Soft Gesellschaft fuer elektronische Beschriftungs-Software mbH Neckargartacher Str. 114, 74080 Heilbronn, Germany Tel: +49 (0)7131 / 9466-0 Email: info@ebsoft.de Fax: +49 (0)7131 / 1099-0 Homepage: www.ebsoft.de Amtsgericht-Registergericht-Stuttgart HRB 102882 Geschaeftsfuehrer: Michael Ehring, Helmut Sigler _________________________________________________________________________________