MySQL Workbench Cannot Detect Any Servers

Hello,

Running MySQL Workbench for some assignments at my university. But I can’t get it to work on Arch. I’ve installed MariaDB, the packages that come with it and MySQLWorkBench, but even after installation and creating accounts, I get an error when opening MySQL WorkBench. I’ve put snapshots below:



This is all while I’m running sudo mariadb by the way.

My installation steps were:

[user@user~]$ sudo pacman -Syu 
:: Synchronizing package databases... 
core is up to date 
extra is up to date 
community is up to date 
multilib is up to date 
:: Starting full system upgrade... 
there is nothing to do
[user@user~]$ su -l root 
Password:  
[user~]# pacman -S mariadb mysql-workbench 
warning: mariadb-10.9.3-1 is up to date -- reinstalling 
warning: mysql-workbench-8.0.30-2 is up to date -- reinstalling 
resolving dependencies... 
looking for conflicting packages... 

Packages (2) mariadb-10.9.3-1  mysql-workbench-8.0.30-2 

Total Installed Size:  304.07 MiB 
Net Upgrade Size:        0.00 MiB 

:: Proceed with installation? [Y/n] y 
(2/2) checking keys in keyring                                                                                                  [#############################################################################] 100% 
(2/2) checking package integrity                                                                                                [#############################################################################] 100% 
(2/2) loading package files                                                                                                     [#############################################################################] 100% 
(2/2) checking for file conflicts                                                                                               [#############################################################################] 100% 
(2/2) checking available disk space                                                                                             [#############################################################################] 100% 
:: Processing package changes... 
(1/2) reinstalling mariadb                                                                                                      [#############################################################################] 100% 
(2/2) reinstalling mysql-workbench                                                                                              [#############################################################################] 100% 
:: Running post-transaction hooks... 
(1/7) Creating system user accounts... 
(2/7) Reloading system manager configuration... 
(3/7) Creating temporary files... 
(4/7) Arming ConditionNeedsUpdate... 
(5/7) Updating the MIME type database... 
(6/7) Updating icon theme caches... 
(7/7) Updating the desktop file MIME type cache... 
[user~]# mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql 
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ... 
OK 

To start mysqld at boot time you have to copy 
support-files/mysql.server to the right place for your system 


Two all-privilege accounts were created. 
One is root@localhost, it has no password, but you need to 
be system 'root' user to connect. Use, for example, sudo mysql 
The second is mysql@localhost, it has no password either, but 
you need to be the system 'mysql' user to connect. 
After connecting you can set the password, if you would need to be 
able to connect as any of these users with a password and without sudo 

See the MariaDB Knowledgebase at https://mariadb.com/kb 

You can start the MariaDB daemon with: 
cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql' 

You can test the MariaDB daemon with mysql-test-run.pl 
cd '/usr/mysql-test' ; perl mysql-test-run.pl 

Please report any problems at https://mariadb.org/jira 

The latest information about MariaDB is available at https://mariadb.org/. 

Consider joining MariaDB's strong and vibrant community: 
https://mariadb.org/get-involved/

Then initialization:

[user~]# systemctl enable --now mysql
[user~]# mysql_secure_installation 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB 
     SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY! 

In order to log into MariaDB to secure it, we'll need the current 
password for the root user. If you've just installed MariaDB, and 
haven't set the root password yet, you should just press enter here. 

Enter current password for root (enter for none):  
OK, successfully used password, moving on... 

Setting the root password or using the unix_socket ensures that nobody 
can log into the MariaDB root user without the proper authorisation. 

You already have your root account protected, so you can safely answer 'n'. 

Switch to unix_socket authentication [Y/n] n 
... skipping. 

You already have your root account protected, so you can safely answer 'n'. 

Change the root password? [Y/n] n 
... skipping. 

By default, a MariaDB installation has an anonymous user, allowing anyone 
to log into MariaDB without having to have a user account created for 
them.  This is intended only for testing, and to make the installation 
go a bit smoother.  You should remove them before moving into a 
production environment. 

Remove anonymous users? [Y/n] y 
... Success! 

Normally, root should only be allowed to connect from 'localhost'.  This 
ensures that someone cannot guess at the root password from the network. 

Disallow root login remotely? [Y/n] n 
... skipping. 

By default, MariaDB comes with a database named 'test' that anyone can 
access.  This is also intended only for testing, and should be removed 
before moving into a production environment. 

Remove test database and access to it? [Y/n] y 
- Dropping test database... 
... Success! 
- Removing privileges on test database... 
... Success! 

Reloading the privilege tables will ensure that all changes made so far 
will take effect immediately. 

Reload privilege tables now? [Y/n] y 
... Success! 

Cleaning up... 

All done!  If you've completed all of the above steps, your MariaDB 
installation should now be secure. 

Thanks for using MariaDB! 

Then setting up the accounts

[user~]# 
[user~]# mysql -u root -p 
Enter password:  
Welcome to the MariaDB monitor.  Commands end with ; or \g. 
Your MariaDB connection id is 12 
Server version: 10.9.3-MariaDB Arch Linux 

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 

MariaDB [(none)]> CREATE USER 'user'@'localhost' IDENTIFIED BY ''; 
Query OK, 0 rows affected (0.077 sec) 

MariaDB [(none)]> GRANT ALL PRIVILEGES ON mydb.* TO 'user'@'localhost'; 
Query OK, 0 rows affected (0.026 sec) 

MariaDB [(none)]> FLUSH PRIVILEGES; 
Query OK, 0 rows affected (0.001 sec) 

MariaDB [(none)]> quit 
Bye

Finally, showing the table of users yields the following output.

MariaDB [(none)]> SELECT Host, User, Password FROM mysql.user;
ERROR 1146 (42S02): Table 'mysql.user' doesn't exist

Also sudo /usr/bin/mysqld_safe --datadir='/var/lib/mysql' gives:

[user@user usr]$ sudo /usr/bin/mysqld_safe --datadir='/var/lib/mysql' 
[sudo] password for uthlakanyana: 
221019 17:52:14 mysqld_safe Logging to '/var/lib/mysql/user.err'.
221019 17:52:14 mysqld_safe Starting mariadbd daemon with databases from /var/lib/mysql

Looking forward to any assistance.

Thanks in advance.

1 Like

I’m trying to make MySQL Workbench discover the MySQL server running on my archlinux computer. The server is running:

[uther@uther ~]$ sudo systemctl status mysqld
[sudo] password for uther: 
● mariadb.service - MariaDB 10.9.3 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
     Active: active (running) since Sat 2022-10-22 17:07:04 WAT; 17min ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 4471 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 9 (limit: 18918)
     Memory: 147.2M
        CPU: 414ms
     CGroup: /system.slice/mariadb.service
             └─4471 /usr/bin/mariadbd

Oct 22 17:07:04 uther mariadbd[4471]: 2022-10-22 17:07:04 0 [Note] Server socket created on IP: '::'.
Oct 22 17:07:04 uther mariadbd[4471]: 2022-10-22 17:07:04 0 [Note] InnoDB: Buffer pool(s) load completed at 221022 17:07:04
Oct 22 17:07:04 uther mariadbd[4471]: 2022-10-22 17:07:04 0 [Note] /usr/bin/mariadbd: ready for connections.
Oct 22 17:07:04 uther mariadbd[4471]: Version: '10.9.3-MariaDB'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Arch Linux
Oct 22 17:07:04 uther systemd[1]: Started MariaDB 10.9.3 database server.
Oct 22 17:10:25 uther mariadbd[4471]: 2022-10-22 17:10:25 14 [Warning] Access denied for user 'testuser'@'localhost' (using password: YES)
Oct 22 17:10:30 uther mariadbd[4471]: 2022-10-22 17:10:30 15 [Warning] Access denied for user 'testuser'@'localhost' (using password: NO)
Oct 22 17:10:53 uther mariadbd[4471]: 2022-10-22 17:10:53 16 [Warning] Access denied for user 'testuser'@'localhost' (using password: YES)
Oct 22 17:11:26 uther mariadbd[4471]: 2022-10-22 17:11:26 18 [Warning] Access denied for user 'user'@'localhost' (using password: YES)
Oct 22 17:13:19 uther mariadbd[4471]: 2022-10-22 17:13:19 20 [Warning] Access denied for user '-p'@'localhost' (using password: NO)

However when I try scanning for servers in MySQL Workbench, nothing comes up as shown here.

Any help wold be appreciated. Thank you.

Have you already checked those?

Yes I have.

The wiki doesn’t have anything on mysql-workbench either.

Hello,

Have you checked this ?? → Configure MySQL Workbench

I just skimmed through it. I think it may help.

You know that a user must be created… and password must be set. right?

Does this mean you are connecting from manjaro machine to arch machine? If yes, then of course you can’t connect since @'localhost' allows, as name suggests, only users from localhost.

This has been discussed on multiple occasions - please use the search function

mysql5.7 install ?

mysql client kurulumunda hazır ayarlar neden yok
mariadb ye mecburmuyuz mysql istiyosuz seçenekneden yok

apache server neden localde ve dışarı yayın yapmıyor

Lamp server pkg neden yok ?