admin管理员组文章数量:1433896
We have a new Dell computer and want to work with mysql databases on it. In the past, we used Mysql workbench, Mysql-server and unique users on each computer, but now we want to give access to multiple users.
However, on our new computer, Fedora 40 Scientific is installed as operating system and this includes MariaDB instead of MysqlDB. How can we configure our computer and software such that more than one user can work with mysql databases on it?
We have a new Dell computer and want to work with mysql databases on it. In the past, we used Mysql workbench, Mysql-server and unique users on each computer, but now we want to give access to multiple users.
However, on our new computer, Fedora 40 Scientific is installed as operating system and this includes MariaDB instead of MysqlDB. How can we configure our computer and software such that more than one user can work with mysql databases on it?
Share Improve this question asked Nov 19, 2024 at 0:30 LaplacetransformLaplacetransform 91 bronze badge 8- 1 You can install MySQL on any Linux. Yum packages are available if you add MySQL's Yum repo. Instructions are here: dev.mysql/doc/refman/8.4/en/… – Bill Karwin Commented Nov 19, 2024 at 0:46
- 1 MySQL can coexist on a server with MariaDB, provided you configure them with distinct ports, sockets, and datadirs. Alternatively, you can uninstall MariaDB. – Bill Karwin Commented Nov 19, 2024 at 0:47
- 1 Then it's just a matter of adding users that permit remote connections. Cf. dev.mysql/doc/refman/8.4/en/creating-accounts.html – Bill Karwin Commented Nov 19, 2024 at 0:51
- 1 I’m not sure whether you realize this: MariaDb and MySql are almost entirely compatible with each other. Various Linux distros use the MariaDb fork because it’s getting more love from its developers than MySql is from its Oracle overlords. – O. Jones Commented Nov 19, 2024 at 12:12
- 1 @O.Jones that was true 14 years ago, when the two forked. By now the list of incompatibilities is pretty long and discrepancies started to appear even on protocol level. – Shadow Commented Nov 19, 2024 at 17:33
1 Answer
Reset to default 0Make sure the MariaDB server is started up by running systemctl start mariadb.service
. You can then access the MariaDB instance on the local server as the root user using sudo mariadb
. If you need remote access, make sure you set bind-address=0.0.0.0
in a configuration file (usually in /etc/my.cnf.d/
for Fedora).
For each user who you want to give access to, create a new user using the CREATE USER SQL command. This gives them access to the database.
If you want to just isolate users to their own subsets of tables, you can use the CREATE SCHEMA command to create a schema for each user and then grant them permission to do what they want using the GRANT command.
For example, if I have users bob
and alice
and I want bob
to have access to the bob_db
schema and alice
to have access to the alice_db
schema, I'd execute the following SQL:
CREATE USER bob IDENTIFIED BY 'bob_secret';
CREATE SCHEMA bob_db;
GRANT ALL ON bob_db.* TO bob;
CREATE USER alice IDENTIFIED BY 'alice_secret';
CREATE SCHEMA alice_db;
GRANT ALL ON alice_db.* TO alice;
本文标签: mariadbMySQLMysql Workbench and multiple usersStack Overflow
版权声明:本文标题:MariaDB, Mysql, Mysql Workbench and multiple users - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745588055a2665029.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论