Skip Navigation

My i3wm linux session is preventing me to correctly use MySQL, but I don't know how to fix this

I am running in the same Linux distro two environments: Plasma (former KDE) and i3wm.

I use the same command on both environments: sudo systemctl start mysql.service && sudo mysql -u root -p -h localhost -P 3306, but while on KDE/Plasma I get no error, on i3wm I get a "the name is not activatable" error, and I don't know how to fix it (here's a screenshot).

Here's an extract from MySQL Workbench:

04:32:53 [ERR][SQL Editor Form]: SQL editor could not be connected: The name is not activatable
04:32:53 [ERR][SQL Editor Form]: Your connection attempt failed for user 'root' to the MySQL server at 127.0.0.1:3306:
  The name is not activatable

Also, I found out firefox doesn't connect to 127.0.0.1:3306 either on i3; on Plasma I get something like ("The connection has been restarted. The connection to the server was reset while the page was loading.").

I find is interesting too, because syncthing can connects through the localhost on i3wm, but mariadbd can't for some reason:

sudo lsof -n | grep TCP | grep LISTEN
[…]
syncthing   841 31843 syncthing          alberto  14u     IPv4              11863       0t0        TCP 127.0.0.1:8384 (LISTEN)
mariadbd   2537                            mysql  32u     IPv4              16382       0t0        TCP *:mysql (LISTEN)
11
11 comments
  • Odd. On first read, that doesn't seem like something that your desktop manager should impact.

    In your situation, I would research whether Plasma is auto starting a necessary/related background service; and then check my i3 configuration for whether I need to add an equivalent.

    • Thanks for replying! I have checked the autostart processes related to network and I got no different result. I will continue to check all of them though.

  • Just a wild guess, but does your i3 setup have Polkit setup fully like it would be in KDE? The "the name is not activatable" is a string typically stemming from DBus. Especially for potential cross-user services that may require various permission sets, polkit is often utilized to bridge what is necessary. If you don't have an authentication agent setup for your i3 desktop, you should probably set one up, even if it is something basic like xfce's or lxqt's.

    • Hi! Thanks for replying!
      After logging on i3, htop shows me that I have a process called /usr/lib/polkit-1/polkitd --no-debug. I checked with polkit-kde-agent by running /usr/lib/polkit-kde-authentication-agent-1 &. I started MySQL with the same previous command (sudo systemctl start mysql.service && sudo mysql -u root -p -h localhost -P 3306) and checked the databases (SHOW DATABASES;), which worked: it shows the database with its schemas; but when I open Workbench again, it shows the same error message; so, from what you said above, it sounds more like a Workbench DBus issue (although I have no idea about DBus haha)

      • So you executed KDE's auth agent in a terminal and then ran the mysql service through the same terminal and everything worked? If so, that's good. I believe the only thing missing to getting SQL Workbench working is by having your authorization agent of choice launched in your i3 .xinitrc file. That way it should initialize any environment variables for your full graphical session rather just for a single terminal.

You've viewed 11 comments.