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.