F
F
fapchat2019-10-26 13:37:07
MySQL
fapchat, 2019-10-26 13:37:07

How to export mysql db data in csv format?

[email protected]:/home/fapchat/Рабочий стол/papka/backups of mysql# mysqldump -u fapchat -ppassword --no-create-info --tab=/home/fapchat/'Рабочий стол'/papka/'backups of mysql' --fields-terminated-by=',' publications
mysqldump: Got error: 1: "Can't create/write to file '/home/fapchat/Рабочий стол/papka/backups of mysql/accounts.txt' (Errcode: 13 "Permission denied")" when executing 'SELECT INTO OUTFILE'

This user has privileges
MariaDB [(none)]> GRANT ALL ON *.* TO 'fapchat'@'localhost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.14 sec)

I closed all database tables
MariaDB [publications]> LOCK TABLES
    -> classics Read, customers read;
Query OK, 0 rows affected (0.00 sec)
(even if not all, it should still work)
MariaDB [publications]> show tables;
+------------------------+
| Tables_in_publications |
+------------------------+
| accounts               |
| classics               |
| customers              |
+------------------------+
3 rows in set (0.00 sec)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fapchat, 2019-10-26
@fapchat

chmod 777 /home/fapchat/'Desktop'/papka/'backups of mysql'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question