安装
[root@centos-linux-gitlab ~]# yum -y install mariadb mariadb-devel mariadb-server MariaDB-shared
启动
[root@centos-linux-gitlab ~]# systemctl enable mariadb Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. [root@centos-linux-gitlab ~]# systemctl start mariadb
生成密码
[root@jenkins ~]# DB_PASSWORD=`cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 24` [root@jenkins ~]# echo -e "\033[31m 你的数据库密码是 $DB_PASSWORD \033[0m" 你的数据库密码是 7rLnx6pOsctB53NvhmzTuuYj
设置root密码
[root@jenkins ~]# mysqladmin -uroot password '7rLnx6pOsctB53NvhmzTuuYj'
登陆设置远程访问
[root@10 ~]# mysql -uroot -p7rLnx6pOsctB53NvhmzTuuYj Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 6 Server version: 5.5.64-MariaDB MariaDB Server 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)]> grant all privileges on *.* to 'root'@'%' identified by '7rLnx6pOsctB53NvhmzTuuYj'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.01 sec)
继续阅读
- 我的QQ
- QQ扫一扫
-
- 我的头条
- 头条扫一扫
-
评论