Wednesday, February 25, 2015

Re: dbext without a password



On Wed, Feb 25, 2015 at 12:02 PM, Paul <google1241@rainslide.net> wrote:
On Sunday, 22 February, 2015 at 17:42:55 GMT, David Fishburn wrote:
Outside of dbext, can you concoct a mysql command line that does what you
want without using a password.  That usually helps when coming up with the
connection profile that will result in the same command line.

You can also see the dbext command line by running:
:DBSetOption display_cmd_line=1

With that DBSetOption, I can see that the command dbext is using is:

    mysql  -u root -D test -t < /tmp/vplBhqM/dbext.sql

I have previously defined some other mysql user and password in ~/.my.cnf. With the above command line, mysql, since there is no password parameter given, [I'm assuming] takes the password from ~/.my.cnf, which is not necessarily the password of the root user. I think this is a failing of mysql rather than dbext. A command that does is:

    mysql  -u root --password='' -D test -t < /tmp/vplBhqM/dbext.sql


Okay, great, now you have a mysql command line which works as you want.

Were you able to create a dbext profile that will add that?

If you create the following profile in your .vimrc:

let g:dbext_default_profile_mysql_no_password = "type=MYSQL:user=root:passwd=:dbname=mysql:extra=--password='' "

Then for me this produced the following mysql command line:

mysql  -u root -D mysql --password=''  < D:\WINDOW~1\dbext.sql


This one indicated to used the -t (tabbed) output:

let g:dbext_default_profile_mysql_no_password_tabbed = "type=MYSQL:user=root:passwd=:dbname=mysql:extra=-t --password='' "


Thanks for getting back to the list.  I will update the dbext.txt with this example.


HTH,
David

 

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment