Export database and import to server
-
Hello,
I try to export my Laravel database from maridb and import it to my online server which is works with phpmyadmin but when i try to import i'll get errors.I tried to export with different settings such as check (Drop,Create) or Data: (insert,No data) etc. but in all versions of extract file i'll get error in my server.
What is the solution? i need to move my work from local to host. I also tried to install phpmyadmin in "{laragon}/etc/apps" but that doesn't work as well.
Please someone lead me i really need to import my database to my website.
Thank you.
-
@Robert-Nicjoo :
If you familiar with phpMyAdmin, you can install it to Laragon easily:
https://forum.laragon.org/topic/445/phpmyadmin-404-nginx
-
If you had errors, please post here so I can help. Without information about errors, no one can help you
-
Hi,
I get phpmyadmin to work only needed to restart my laragon but when i try to import my extractet database to server i get this error
Error
SQL query:
ALTER TABLE
categories
ADD PRIMARY KEY (id
),
ADD UNIQUE KEYcategories_slug_unique
(slug
),
ADD KEYcategories_parent_id_foreign
(parent_id
)MySQL said: Documentation
#1071 - Specified key was too long; max key length is 767 bytes
-
What is your Database Server's (version, OS,...)
-
@leokhoa Info from my server phpmyadmin
Database server
Server: Localhost via UNIX socket Server type: MariaDB Server version: 10.1.20-MariaDB - MariaDB Server Protocol version: 10 Server charset: UTF-8 Unicode (utf8)
Web server
Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP extension: mysqliDocumentation curlDocumentation mbstringDocumentation PHP version: 7.0.8
phpMyAdmin
Version information: 4.6.6 , latest stable version: 4.7.0
-
@Robert-Nicjoo : As the Database Server is the same, this SO should help:
http://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes