Cách 1: Đọc bài cũ
Cách 2: Cho file sql lên trực tiếp vps
Sau đó dùng câu lệnh sau để import sql vào mysql trên vps
Còn trong trường hợp muốn import table và db thì dùng lệnh sau
mysql –user=root web_nghia1 -p < wp_posts.sql
Với windows thì mọi người làm như ảnh sau:
Trong khi import file cỡ lớn, thi thoảng bị gặp trường hợp
=> Got a packet bigger than ‘max_allowed_packet’ bytes
Cách fix đó là ở câu lệnh import thêm –max_allowed_packet
mysql.exe –max_allowed_packet=1000M -u root -p meeyads2 < D:\downloads\meeyads2.sql Bước 2 là thêm 2 biến global trong mysql: set global net_buffer_length=1000000; set global max_allowed_packet=1000000000;
— max_allowed_packet (2 dau tru nhe)