MySQL Forums
Forum List  »  Newbie

Re: Have Command Prompt, Need to connect to MySQL program in a text file
Posted by: Barry Galbraith
Date: March 14, 2017 08:49PM

Is notepad a euphemism for a PC, or do you mean Windows Notepad? If the latter, you mean the MySQL "program" is a text (or sql) file made / read with Notepad.

If you have MySQL commandline client on your PC, then you open a Windows commandline aka "a DOS box" and type
>mysql -u<user> -p < c:/path/to/sql_text.file

Hopefully the MySQL server will respond requesting the password for the MySQL user in your commandline.
type the password, press <ENTER> and your sql_text.file will be read into MySQL.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: Have Command Prompt, Need to connect to MySQL program in a text file
March 14, 2017 08:49PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.