Alooo fren, Assalamualaykum, May Peace be upon you,
Pada saat mau load record atau data ke databases, muncul pesan ini di mysqlnya :
mysql> LOAD DATA LOCAL INFILE '/home/belajar/db_1/dummy.txt' INTO TABLE pet;
ERROR 1148 (42000): The used command is not allowed with this MySQL version
"DISITU TERKADANG SAYA MERASA SEDIH ..."-->bedeme
cara mengatasinya adalah:
quit dari mysql
lalu masuk kembali :
belajar@serverku:~$ mysql --local-infile=1 -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 37
Server version: 5.5.46-0ubuntu0.12.04.2 (Ubuntu)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
lalu lakukan command berikut : (sesuaikan dengan database dan nama table yang kamu buat)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| ldblivescratch |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)
mysql> use ldblivescratch
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+--------------------------+
| Tables_in_ldblivescratch |
+--------------------------+
| pet |
+--------------------------+
1 row in set (0.00 sec)
HASILNYA : ("OKE YEAH " -->bedeme)
mysql> LOAD DATA LOCAL INFILE '/home/belajar/db_1/dummy.txt' INTO TABLE pet;
Query OK, 7 rows affected (0.23 sec)
Records: 7 Deleted: 0 Skipped: 0 Warnings: 0
Semoga bermanfaat.
Wasalamualaykum.
cheers:
link untuk tutorial yang gak ada di blog ini : adamaloOo
NOTE :
saya gunakan
mysql Ver 14.14 Distrib 5.5.46, for debian-linux-gnu (i686) using readline 6.2
No comments:
Post a Comment