How can I use 'system pwd' command with MySql CONCAT() function?
system is not a recognized MySQL server command. This will only work on the MySQL command line interface "mysql". With a command like this:

mysql&gt; system pwd
/tmp


you will get the client's current directory, nothing to do with the server. You cannot use that information on server side, for executing queries. If you want to concat the pwd with something else, use a script at client side (bash, php). For example:

$ echo $(pwd)test
/tmptest
$ mysql  -e "SELECT concat('$(pwd)', 'test')" # there is not reason to do this at all
+------------------------+
| concat('/tmp', 'test') |
+------------------------+
| /tmptest               |
+------------------------+


While there is a custom non-standard UDF library to make MySQL server interact with the operating system, I do not see a valid use in your case.

If you want to know the directory where MySQL is installed, where the datafiles are, etc., you can execute:

mysql&gt; SHOW GLOBAL VARIABLES like '%dir';
+---------------------------+--------------------------+
| Variable_name             | Value                    |
+---------------------------+--------------------------+
| basedir                   | /usr/local/mysql         |
| datadir                   | /usr/local/mysql/data/   |
...