【MariaDB】MariaDB 10.7.3二进制包安装

1、上传MariaDB 10.7.3二进制包到/usr/local/src目录下

# cd /usr/local/src/
# rz
rz waiting to receive.
Starting zmodem transfer.  Press Ctrl+C to cancel.
Transferring mariadb-10.7.3-linux-systemd-x86_64.tar.gz...
  100%  338007 KB    24143 KB/sec    00:00:14       0 Errors  

# ll
-rw-r--r-- 1 root root 346120004 Apr 11 03:12 mariadb-10.7.3-linux-systemd-x86_64.tar.gz

2、解压包,并将解压后的目录移动到/usr/local/mysql目录下

# tar -xzf mariadb-10.7.3-linux-systemd-x86_64.tar.gz
# mv mariadb-10.7.3-linux-systemd-x86_64 /usr/local/mysql
# cd ../mysql
# ls
bin  COPYING  CREDITS  include  INSTALL-BINARY  lib  man  mysql-test  README.md  README-wsrep  scripts  share  sql-bench  support-files  THIRDPARTY

3、创建数据目录

# mkdir -p /data/mysql

4、创建mysql用户和组,并为目录赋mysql用户和组权限

# groupadd mysql
# useradd -d /data/mysql -g mysql mysql
# chown -R mysql.mysql /data/mysql /usr/local/mysql

5、安装MariaDB

# cd /usr/local/mysql
# ./scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/mysql --skip-name-resolve --user=mysql
Installing MariaDB/MySQL system tables in '/data/mysql' ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system


Two all-privilege accounts were created.
One is root@localhost, it has no password, but you need to
be system 'root' user to connect. Use, for example, sudo mysql
The second is mysql@localhost, it has no password either, but
you need to be the system 'mysql' user to connect.
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo

See the MariaDB Knowledgebase at https://mariadb.com/kb

You can start the MariaDB daemon with:
cd '/usr/local/mysql' ; /usr/local/mysql/bin/mysqld_safe --datadir='/data/mysql'

You can test the MariaDB daemon with mysql-test-run.pl
cd '/usr/local/mysql/mysql-test' ; perl mysql-test-run.pl

Please report any problems at https://mariadb.org/jira

The latest information about MariaDB is available at https://mariadb.org/.

Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

# cd /data/mysql/
# ll
total 111020
-rw-rw---- 1 mysql mysql    409600 Apr 14 03:10 aria_log.00000001
-rw-rw---- 1 mysql mysql        52 Apr 14 03:10 aria_log_control
-rw-rw---- 1 mysql mysql       942 Apr 14 03:10 ib_buffer_pool
-rw-rw---- 1 mysql mysql  12582912 Apr 14 03:10 ibdata1
-rw-rw---- 1 mysql mysql 100663296 Apr 14 03:10 ib_logfile0
drwx------ 2 mysql mysql      4096 Apr 14 03:10 mysql
-rw-r--r-- 1 root  root         14 Apr 14 03:10 mysql_upgrade_info
drwx------ 2 mysql mysql        20 Apr 
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

cnskylee

技术分享我是认真的,期待您打赏

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值