Cannot run any db commands from Local CLI

Issue Summary

Upon starting the Local CLI from a site i get this message:

-e Setting Local environment variables...
----
WP-CLI:   WP-CLI 2.7.1
Composer: 2.1.5 2021-07-23
PHP:      7.4.30
mysql: /home/user/.config/Local/lightning-services/php-7.4.30+5/bin/linux/shared-libs/libtinfo.so.5: version `NCURSES_TINFO_6.2.20211010' not found (required by /lib/x86_64-linux-gnu/libncurses.so.5)
MySQL:    
----
Launching shell: /bin/bash ...
user@user ~/Local Sites/zoomer/app/public $ 

Also, when trying to run any db command, i get this error

Error: Failed to get current SQL modes. Reason: mysql: /home/user/.config/Local/lightning-services/php-7.4.30+5/bin/linux/shared-libs/libtinfo.so.5: version `NCURSES_TINFO_6.2.20211010' not found (required by /lib/x86_64-linux-gnu/libncurses.so.5)

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular?
    This happens for all Local sites, i’ve had this problem for quite a while but thought it would be solved in the coming versions, but it unfortunately wasn’t solved.

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser?
    Yes

Replication

Describe the steps that others can take to replicate this issue. If you have screenshots that can help clarify what is happening, please include them!
Run wp db commands, or just mysql commands, opening the site shell.

System Details

  • Which version of Local is being used?
    7.0.1, but had this issue on previous versions too.

  • What Operating System (OS) and OS version is being used?
    Linux

  • Attach the Local Log. See this Help Doc for instructions on how to do so:
    Log.zip attached
    local-logs.zip (18.4 KB)

Security Reminder

Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

fixed it using this ticket

1 Like

Hi @h_dwd -

Thank you for letting us know what worked for you!

We appreciate it,

Sam :green_heart:

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.