manjaro安装MySQL(mariadb)

sudo pacman -S mariadb
resolving dependencies...
looking for conflicting packages...

Packages (3) mariadb-clients-10.3.14-1  mariadb-libs-10.3.14-1
             mariadb-10.3.14-1

Total Installed Size:  273.14 MiB

:: Proceed with installation? [Y/n] y
(3/3) checking keys in keyring                     [###################] 100%
(3/3) checking package integrity                   [###################] 100%
(3/3) loading package files                        [###################] 100%
(3/3) checking for file conflicts                  [###################] 100%
(3/3) checking available disk space                [###################] 100%
:: Processing package changes...
(1/3) installing mariadb-libs                      [###################] 100%
(2/3) installing mariadb-clients                   [###################] 100%
(3/3) installing mariadb                           [###################] 100%
:: You need to initialize the MariaDB data directory prior to starting
   the service. This can be done with mysql_install_db command, e.g.:
   mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
Optional dependencies for mariadb
    galera: for MariaDB cluster with Galera WSREP
    perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and
    mysql_setpermission
:: Running post-transaction hooks...
(1/4) Reloading system manager configuration...
(2/4) Creating system user accounts...
(3/4) Creating temporary files...
(4/4) Arming ConditionNeedsUpdate...
sudo mysql_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


PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h manjaro password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

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 http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/
$ systemctl start mariadb
$ mysqladmin -u root password '123456'

补充:

  1. 开机自启
systemctl enable mariadb
# 与disable相对

问题1:
MySQL Workbench在manjaro中出现 Could not store password: The name org.freedesktop.secrets was not provided by any.service files的错误

解决:安装 gnome-keyring 包。

你可能感兴趣的:(安装配置,linux)