First, the installation process reference related articles:
Centos installs mariadb with Yum
CentOS Installation and Setup mariadb
CentOS installs and configures mariadb with Yum
MARIADB Remote Connection Configuration
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)
Installing MARIADB with Yum (official documentation)
Second, set the connection rules
1. Login MARIADB
#mysql-U-root-p
2. Set up the database
> Use MySQL
3. Configure Connection Rules
> Grant all privileges on * * to ' root ' @ '% ' identified by ' passwd ' with GRANT OPTION;
This means that the root account can be used in any location to connect
If you want to specify the IP, modify the following (IP is 192.168.1.120 machine can be connected):
GRANT all privileges on * * to ' root ' @ ' 192.168.1.120 ' identified by ' passwd ' with GRANT OPTION;
4. Save changes
> Flush Privileges;
>quit
Third, set the database case is not sensitive, the database code is UTF-8
After logging in with the root account, the/etc/my.cnf.d/server.cnf file
Under [Mysqld], add the following content.
Character_set_server=utf8
Lower_case_table_names=1
Four, restart MariaDB
#service MySQL Restart
Install the MARIADB step under Centos6.6 and install the second article with Yum