Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Sep 15 19:53
    nbari commented #771
  • Sep 15 19:20
    meeuw commented #714
  • Sep 15 19:08
    meeuw commented #771
  • Sep 13 11:57
    orioljd commented #399
  • Sep 13 08:21
    nbari opened #771
  • Aug 30 19:11
    nicolaiskogheim commented #770
  • Aug 30 19:09
    nicolaiskogheim commented #770
  • Aug 27 04:24
    dmnlk commented #714
  • Aug 26 17:32
    meeuw commented #770
  • Aug 26 11:45
    tsroten edited #770
  • Aug 26 11:44
    tsroten commented #770
  • Aug 26 11:35
    notaduck commented #770
  • Aug 26 07:44
    notaduck opened #770
  • Aug 25 12:24
    tsroten commented #767
  • Aug 25 12:21
    tsroten commented #767
  • Aug 21 15:56
    joestepp commented #768
  • Aug 21 12:07
    tsroten commented #768
  • Aug 21 12:05
    tsroten unlabeled #768
  • Aug 21 12:03

    tsroten on v1.20.1


  • Aug 21 12:03

    tsroten on master

    Releasing version 1.20.1. (compare)

Irina Truong
@fujiangkun try specifying host explicitly (for example, mycli -h
it works
Irina Truong
@fujiangkun I seem to remember we fixed this bug before. What version are you on?
Hi, can anyone pleae help with incremental search? On Ubuntu Xenial, pressing CTRL+r does not have any effect.
I found this issue: dbcli/mycli#551. However, I appear to have python3-sqlparse/xenial,xenial,xenial,xenial,now 0.1.18-1 all [installed,automatic]
Moreover, I'd prefer to type and press CTRL+<ArrowUp> as I already do this for the command-line history ("\e[1;5A": history-search-backward in .inputrc). Is there a way to accomplish that? Should I open a request?
Hi. How can I set autoexecuting sql command after mycli connecting?
Hey! I was wondering if there is a way to use MyCLI programmatically on an existing db connection? I would like to use MyCLI mid-transaction while running python tests. So mid-test python code would look like: dear_mycli_run_shell_using_this_db_connection(some_connection) and this would land me in MyCli shell.
Electrical Business Solutions
source db.sql; return error .
Brian Miller
hi, is there a bug with the way mycli (v1.16.0) connects? I notice the error messages keep pre-pending u' to everything when it fails to connect? Also -p seems to behave the opposite of what is expected when it is blank...
Alex Popov
Hello. If the result of a query is wider than my screen, but I want to keep in table format and not use --auto-vertical-output, is there a way to prevent a line wrap?
hi, i have follow section in my .myclirc, how can i connect to this test server, tried mycli test, mycelia -d mycli test, prompt error no such option -d
 user = root
 password = 1234
 host =
 database = test
 port =  3306
why the query result can not highlight? just the sql can highlight?
Hi, I have the following command, "use test_database;", is there a way to alias this in mycli?
Samer Atiani
Hello all, I'm facing problems with writing to CSV files in mycli (version 1.17.0), it seems like I can write only once per session to a file, and the only way to write to two files is to exit the session and rerun the commands:
~ % mycli
Version: 1.17.0
Chat: https://gitter.im/dbcli/mycli
Mail: https://groups.google.com/forum/#!forum/mycli-users
Home: http://mycli.net
Thanks to the contributor - Magnus udd
mariadb web@localhost:db> \T csv
Changed table format to csv
Time: 0.000s
mariadb web@localhost:db> \o ~/test.csv
Time: 0.000s
mariadb web@localhost:db> select count(*) from test_table;
1 row in set
Time: 0.006s
mariadb web@localhost:db> \o ~/test1.csv
Time: 0.000s
mariadb web@localhost:db> select count(*) from test_table;
1 row in set
Time: 0.001s
mariadb web@localhost:db>
In the example above ~/test.csv is written to, but ~/test1.csv isn't
Is this a known issue?
hello all, i got 2 questions about mycli usage in windows 7:
1, how can PowerCmd work with mycli? i trid and it's a mess.
2, has anyone come accross that whe type 'V' in the keyboard and then it acts just like the key ENTER ?
thanks for sharing solutions.
how to update to 1.17 using homebrew
Hey all, need some help to reverse sort records based on an ID column that is alphanumeric. The IDs are like ABCD0, ABCD2, ABCD3, ABCD10, ABCD1, ABCD11, ABCD9. The expected response is ABCD11, ABCD10, ABCD9, ABCD3, ABCD2, ABCD1, ABCD0. So basically need to sort the records based upon the numeric part of the ID in descending order. The regular sort and order by is sorting it something like - ABCD9, ABCD3, ABCD2, ABCD11, ABCD10, ABCD1, ABCD0 which I do not want.
Hey all, how to use dsn ??
I got a TypeError: argument of type 'NoneType' is not iterable
Daniel Guldberg Aaes

Hi guys. Iøve two quick questions.

1) Is there anyw ay to change this ugly green color of the rows? https://i.imgur.com/Jcg4PNx.png
2) is there an easy way to export a query to a file?

Btw. is there any way to let mycli generate a UML diagram (ASCII will be fine) just like DBeaver and Mysql WOkbench can.
Amjith Ramanujam
1) Yes. You can change the color of the header in your config file. https://github.com/dbcli/mycli/blob/master/mycli/myclirc#L110
2) To redirect the results of a command to a file use the special command \once
Type in help in mycli and you'll see a short description of how to use it.
@notaduck ^
Jim Fisk
@Santiagosp98 I have a very similar problem to the permission denied error you posted: https://gitter.im/dbcli/mycli?at=58f98803f22385553d5ff89a. Do you remember what the "misconfiguration on mysql" was?

I'm trying to install MyCLI in a lando environment, but when I try to open a prompt in the container using "tooling" I get:

Traceback (most recent call last):
  File "/usr/local/bin/mycli", line 11, in <module>
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mycli/main.py", line 1047, in cli
  File "/usr/local/lib/python2.7/dist-packages/mycli/main.py", line 142, in __init__
    write_default_config(self.default_config_file, myclirc)
  File "/usr/local/lib/python2.7/dist-packages/mycli/config.py", line 72, in write_default_config
    shutil.copyfile(source, destination)
  File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: u'/.myclirc'

It was working with an older version of lando...

Jim Fisk
Just to follow up, I resolved this issue by explicitly referencing the user in the lando config, here are the details: lando/lando#1515
Georgi Tapalilov
how can i disable suggestion from previous query?
hi everybody

I'm meeting a problem with show message UNICODE on console with mycli (with image attachment). Please help me how to config mycli to show message unicode beautiful.

I was researched all source but can't config. Please help me.

Aravinda Rao
I'm setting up everything on a new laptop. I see that my select-output in mycli for big-valued columns (like json) are now being truncated :(
Is this a settings thing or something else I'm overlooking?
doesn‘t support delimiter? when i am creating a procedure ,i need delimiter //; but error
Kim Ford
Hi all, just checking out mycli and can't figure out how to run a command after editing it with \e. With mysql you type a ; after exiting vim, but for the life of my I can't find the way to do this. Got milk?

I found the time that the sql statment excute using mycli is much longer than that using original mysql command line. But why???


dev> select item_id from zoro_article_model_copy where marker_id = 6133 and app_id="06141_190614_4653" and `index` = 1;                                                                                                                                                                                         
12960 rows in set
Time: 0.342s
dev> select id from zoro_article_model_copy where marker_id = 6133 and app_id="06141_190614_4653" and `index` = 1;                                                                                                                                                                                              
12960 rows in set
Time: 0.331s


mysql> select id from zoro_article_model_copy where marker_id = 6133 and app_id="06141_190614_4653" and `index` = 1;
| id          |
| 1114576 |
| 1114578 |
| 1114580 |
12960 rows in set (0.06 sec)

Please! I want some help.


The timing config:

# Timing of sql statments and table rendering.
timing = True

What could I do if I just want the timing of sql statments excuted ???

Rob Steuber
Anybody still out there?
Nicolas Embriz
Hi, how to prevent mycli to trim output of data, I see some columns ending with "..."
Nicolas Embriz
if I use \G it shows full data
but not by just a normal query
Nicolas Embriz
I tried already cat a a pager but sill