Jump to content

import a txt file from the command line


jimath

Recommended Posts

hi everone!

could anyone tell me how i can import a txt file with sql commands
from the mysql command line?
the following doesnt help me.
mysqladmin create nuke
mysql nuke<nuke.sql

i have the txt file in a folder into htdocs and i want to run it.
i am already connected to mysql as root.
mysql>
thanks!
Link to comment
https://forums.phpfreaks.com/topic/22891-import-a-txt-file-from-the-command-line/
Share on other sites

Try[tt] mysql [i]database[/i] < [i]/full/path/to/file[/i][/tt]. You may also need to specify the[tt] -p [/tt] option if it is not on by default in your configuration file: [tt] mysql -p [i]database[/i] < [i]/full/path/to/file[/i][/tt]. What error messages are you getting?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.