Import and insert sql.gz file into database with putty

后端 未结 8 977
再見小時候
再見小時候 2021-01-30 00:12

I want to insert a sql.gz file into my database with SSH. What should I do?

For example I have a database from telephone numbers that name is numbers.

8条回答
  •  無奈伤痛
    2021-01-30 00:29

    If the mysql dump was a .gz file, you need to gunzip to uncompress the file by typing $ gunzip mysqldump.sql.gz

    This will uncompress the .gz file and will just store mysqldump.sql in the same location.

    Type the following command to import sql data file:

    $ mysql -u username -p -h localhost test-database < mysqldump.sql password: _

提交回复
热议问题