Boost logo

Boost Users :

From: Label (label_at_[hidden])
Date: 2019-10-16 07:58:49


Hello,

> Date: Tue, 15 Oct 2019 07:28:54 +0000
> From: name name <jerry-dev_at_[hidden]>
> To: "boost-users_at_[hidden]" <boost-users_at_[hidden]>
> Subject: [Boost-users] Help needed with boost::process::child and
>     mysql cli
> Message-ID:
> <MN2PR01MB5710C3F35D092D2FDF0B376DF0930_at_[hidden]>
>
>
> 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_at_[hidden]
Fax: +49 (0)7131 / 1099-0 Homepage: www.ebsoft.de

Amtsgericht-Registergericht-Stuttgart HRB 102882
Geschaeftsfuehrer: Michael Ehring, Helmut Sigler
_________________________________________________________________________________



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net