MySql installed in ArchLinux, manjaro in

      Install MySql database. But after MySql acquisition by Oracle, many open source supporters would switch to a MariaDb. But also MariaDb and MySql compatible, so basically do not have anything to worry about. Since ArchLinux with only MariaDb, so we use MariaDb instead of MySql.

Installation MariaDb and its client tools,

sudo pacman -S mariadb mariadb-clients


After the installation is complete, there will be tips on how to open the MariaDb:

:: 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

Follow the prompts, we can run the following command to initialize the data directory MariaDb.

sudo mysql_install_db --user = mysql --basedir = / usr --datadir = / var / lib / mysql

After a long list of tips after, there will be a corresponding open MariaDb how helpful information:

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 mypc 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
Support MariaDB development by buying support/new features from MariaDB
Corporation Ab. You can contact us about this at [email protected].
Alternatively consider joining our community based development effort:
http://mariadb.com/kb/en/contributing-to-the-mariadb-project/

同样根据提示,我们首先需要先启动MariaDb,

sudo systemctl start mysqld

and then set a new password for the root user,

mysqladmin -u root password '12345678'

and then try to log MariaDb, if the login is successful, the configuration is complete,

mysql -uroot -p 12345678

If you want to MariaDb at startup, then run the following command,

systemctl enable mysqld sudo
---------------------
Author: After a customer that is the
source: CSDN
Original: https: //blog.csdn.net/u011054333/article / details / 53203787
copyright: This article is a blogger original article, reproduced, please attach Bowen link!

Guess you like

Origin www.cnblogs.com/littlesuns/p/10942368.html