mysql - How to transfer my Dump(.sql) file on server? -


i have created dump file database , want put file on server access. copy .sql file on server, don't know how access dump file using commands.

assuming using command line

cd /path/where/sql/file/is 

and then

mysql -u username -p database_name < file.sql 

if don't have mysql bin in path might want run

/path/to/mysql/bin/mysql -u username -p database_name < file.sql 

or temporarily put file.sql in mysql bin directory (not recommended)

another possible scenario point file in filesystem this

mysql -u username -p database_name < /path/where/sql/file/is/file.sql 

if you're on windows might wanna change forward slashes backslashes.


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -