Tag: MariaDB

Install MariaDB 10.4 + Apache2(httpd) 2.4 + PHP 7.3 on CentOS 7.6

1. 准备 cat /etc/redhat-release # CentOS Linux release 7.6.1810 (Core) 2. 安装MariaDB 10.4 cat | sudo tee /etc/yum.repos.d/mariadb.repo <<EOF [mariadb] name = MariaDB baseurl = https://yum.mariadb.org/10.4/rhel7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 EOF sudo yum install MariaDB-server MariaDB-client sudo systemctl start mariadb sudo systemctl enable mariadb #表名大小写不敏感 sudo sed -i ‘s/\[mysqld\]/[mysqld]\nlower_case_table_names=1/’ /etc/my.cnf sudo mysql_secure_installation Create database. Let’s take wordpress as an example: $ mysql -u root -p MariaDB [(none)]> CREATE DATABASE `wordpress` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; MariaDB [(none)]> grant all on wordpress.*…

Read More »

centos7 安装 MariaDB – MySQL社区版

一、安装 # yum install mariadb-server mariadb-client # systemctl start mariadb # systemctl enable mariadb 二、配置 1、修改root用户密码 默认情况下安装好mysql数据库之后root密码是空的,为了安全起见需要修改root用户密码 # mysqladmin -u root password 111111   //将root用户的密码修改为111111 2、表名大小写不敏感 用root帐号登录,在/etc/my.cnf 或 /etc/myql/my.cnf中的[mysqld]后添加 lower_case_table_names=1 三、创建数据库 1、创建数据库 # mysql -u root -p MariaDB [(none)]> CREATE DATABASE `malldb` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; 2、远程连接malldb数据库 MariaDB [(none)]> grant all on malldb.* to root@’%’ identified by ‘123456’;

Read More »