SELECT INTO OUTFILE droits MySQL MariaDB

SELECT customer_id, firstname, surname INTO OUTFILE '/home/exportdata/customers.txt'
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
  LINES TERMINATED BY '\n'
  FROM customers;
chown mysql:mysql /home/exportdata/
chmod 777 /home/exportdata/

edit /etc/systemd/system/mysqld.service
ProtectHome=false
systemctl daemon-reload
/etc/init.d/mysql stop
/etc/init.d/mysql start


     

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

+ thirty three = thirty five