Run sql from file mysql command line
The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked Related Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled.
Accept all cookies Customize settings. Asked 9 years, 11 months ago. Active 2 months ago. Viewed k times. Improve this question. PiJei 4 4 silver badges 16 16 bronze badges. Add a comment. Active Oldest Votes. Improve this answer.
Zoe Edwards Zoe Edwards For mysql 5. This is what worked for me Drop the quotes on ubuntu too mysql Ver Show 7 more comments. Sebas Eugen Rieck Eugen Rieck What about the user's password -p option?
AmirKatz While the password can be given with the -p option, this is not recommended: Other users on the same host can use system tools like ps to read it in this case. EugenRieck -p without an argument prompts for the password to be entered on the next line — Bobby Jack. Paul Preibisch Paul Preibisch 3, 2 2 gold badges 25 25 silver badges 29 29 bronze badges. If you don't want your password to be on the prompt I believe the method outlined here will work: stackoverflow.
Excellent advice from elcuco! Also, probably use another flag after -p or have that be the last arg so another parameter is not erroneously taken to be the intended password. Please note that, command line arguments are still visible by other users.
AlexiusDiakogiannis can you give me example how can you view the command from history when you execute it with [space] before the command? Show 2 more comments.
Bhushan Bhushan I think there should be no space between -p and the password — webNeat. See options and syntax here - dev. I've worked in just about every IT role there is before taking the leap into software development. Visit my blog or find me on Twitter to see what I'm up to. Your email address will not be published. Save my name, email, and website in this browser for the next time I comment.
The path should not be wrapped in quotes! Pretty easy. Show comments Leave a Reply Cancel reply Your email address will not be published. We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. Close Privacy Overview This website uses cookies to improve your experience while you navigate through the website.
0コメント