Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jul 08 21:47
    Maxcrazy1 closed #878
  • Jul 08 21:47
    Maxcrazy1 commented #878
  • Jul 03 14:43
    Maxcrazy1 edited #878
  • Jul 03 14:42
    Maxcrazy1 edited #878
  • Jul 03 14:40
    Maxcrazy1 edited #878
  • Jul 03 14:40
    Maxcrazy1 edited #878
  • Jul 03 14:39
    Maxcrazy1 edited #878
  • Jul 03 14:38
    Maxcrazy1 edited #878
  • Jul 03 14:38
    Maxcrazy1 edited #878
  • Jul 03 14:37
    Maxcrazy1 opened #878
  • Jun 23 15:36
    Cansll opened #877
  • Jun 23 09:50
    guest73 edited #876
  • Jun 22 17:24
    guest73 edited #876
  • Jun 22 17:21
    guest73 opened #876
  • Jun 22 16:54
    guest73 commented #761
  • Jun 22 12:46
    guest73 commented #761
  • Jun 22 12:45
    guest73 commented #761
  • Jun 22 12:42
    guest73 commented #761
  • Jun 16 07:26
    ordiychen commented #102
  • Jun 13 11:13
    wolterhv opened #875
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?
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.
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: 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/", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mycli/", line 1047, in cli
  File "/usr/local/lib/python2.7/dist-packages/mycli/", line 142, in __init__
    write_default_config(self.default_config_file, myclirc)
  File "/usr/local/lib/python2.7/dist-packages/mycli/", line 72, in write_default_config
    shutil.copyfile(source, destination)
  File "/usr/lib/python2.7/", 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
Hey all, I had a problem using mycli in Ubuntu, that it returned 255 when I ran it.
Any idea what's going on here?
Waqar Ali
Hi everyone
Any buddy here
Amjith Ramanujam
Feel free to ask the question, a fellow user might come by and answer it later. This is not an actively monitored channel.
@nbari This issue has been fixed in the newer version of cli_helpers which is a dependency of mycli. Please upgrade using pip install -U cli_helpers.
@kimfucious I hope you figured out how to run the command after editing it. You just press enter and that command will be executed by mysql.
mariadb 10.4.8-MariaDB-1:10.4.8+maria~bionic
mycli 1.20.1
Thanks to the contributor - Johannes Hoff
Exception in thread completion_refresh:
Traceback (most recent call last):
File "/usr/lib/python3.8/", line 932, in _bootstrap_inner
mariadb root@>
File "/usr/lib/python3.8/", line 870, in run
self._target(self._args, *self._kwargs)
File "/usr/lib/python3.8/site-packages/mycli/", line 77, in _bg_refresh
File "/usr/lib/python3.8/site-packages/mycli/", line 865, in _on_completions_refreshed
File "/usr/lib/python3.8/site-packages/prompt_toolkit/application/", line 468, in invalidate
schedule_redraw() Right-arrow to complete suggestion Refreshing completions...
File "/usr/lib/python3.8/site-packages/prompt_toolkit/application/", line 450, in schedule_redraw
File "/usr/lib/python3.8/site-packages/prompt_toolkit/eventloop/", line 57, in call_soon_threadsafe
loop2 = loop or get_event_loop()
File "/usr/lib/python3.8/asyncio/", line 639, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'completion_refresh'.
there is a error when I use mycli visit my db, but I can operate my db with no error.
Daniel Guldberg Aaes
Good morning everybody!
do any of you know if it is possible to use vim over vi as an external editor?
Hello, do anyone know faster way to select first variant than arrow down?
Oh, yes, it is Tab! thank you (found by myself)
Martyn T. Keigher
Hey all!! Been playing with this tool now for a little bit, and its awesome!! Just have one question though... Is there any work being done to make JSON a style\type of output formatting?? I have ran through all the available formats, and while one of them is close (I think CSV?)...would really love it if JSON was available. Any insight that anyone can share on that?? - Thanks.
Martyn T. Keigher
Update: I have my SQL output formatted as JSON, using SELECT JSON_OBJECT('id',id,'name',NAME) AS 'JSON' FROM `table` WHERE `id` = 3;. My formatting is set to 'plain', and this is close to what I am after, but is there anyway to TRIM the header from the output? All I want is the result. Maybe a new format type called 'minimal'?
Does anyone know about this?
this is mycli, and it's normal in mysql
Hi, when I execute multiple statements in the current mycli after a certain statement in the middle fails, the subsequent statement will not continue to execute, how should I set it to continue to execute the following sql when there is a failed statement