执行后结果
You can test the MariaDB daemon with mysql-test-run.pl cd './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/ 安装目录改回root权限 数据目录权限改为mysql total 122924 -rw-rw----. 1 mysql mysql 24576 Jul 2 13:04 aria_log.00000001 -rw-rw----. 1 mysql mysql 52 Jul 2 13:04 aria_log_control -rw-rw----. 1 mysql mysql 972 Jul 2 13:04 ib_buffer_pool -rw-rw----. 1 mysql mysql 12582912 Jul 2 13:04 ibdata1 -rw-rw----. 1 mysql mysql 50331648 Jul 2 13:04 ib_logfile0 -rw-rw----. 1 mysql mysql 50331648 Jul 2 13:04 ib_logfile1 -rw-rw----. 1 mysql mysql 12582912 Jul 2 13:04 ibtmp1 -rw-rw----. 1 mysql mysql 0 Jul 2 13:04 multi-master.info drwx------. 2 mysql mysql 4096 Jul 2 13:04 mysql -rw-rw----. 1 mysql mysql 1864 Jul 2 13:04 mysql.log -rw-rw----. 1 mysql mysql 6 Jul 2 13:04 mysql.pid drwx------. 2 mysql mysql 20 Jul 2 13:04 performance_schema drwx------. 2 mysql mysql 20 Jul 2 13:04 test 配置环境变量 启动mysql Reloading systemd: [ OK ] Restarting mysqld (via systemctl): [ OK ] 查看进程 root 42767 1 3 13:04 ? 00:00:00 /bin/sh /usr/local/mariadb//bin/mysqld_safe --datadir=/data/mariadb/ --pid-file=/data/mariadb/mysql.pid mysql 42876 42767 27 13:04 ? 00:00:00 /usr/local/mariadb/bin/mysqld --basedir=/usr/local/mariadb/ --datadir=/data/mariadb/ --plugin-dir=/usr/local/mariadb//lib/plugin --user=mysql --log-error=/data/mariadb/mysql.log --pid-file=/data/mariadb/mysql.pid --socket=/tmp/mysql.sock --port=3306 root 42911 2197 0 13:04 pts/0 00:00:00 grep mysql Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1816/master tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1551/sshd tcp6 0 0 ::1:25 :::* LISTEN 1816/master tcp6 0 0 :::3306 :::* LISTEN 42876/mysqld tcp6 0 0 :::22 :::* LISTEN 1551/sshd [root@localhost src]#登录测试
localhost src]# /usr/local/mariadb/bin/mysql Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 9 Server version: 10.4.17-MariaDB Source distribution 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)]>注:开启root外联
MariaDB [mysql]> grant all privileges on *.* to 'curefun'@'%' identified by '123456'; Query OK, 0 rows affected (0.003 sec) MariaDB [mysql]> flush privileges; Query OK, 0 rows affected (0.003 sec)------------------------------------end