This commit is contained in:
colben 2024-07-05 20:40:07 +08:00
parent a698172e7f
commit 4caecd979e

View File

@ -74,7 +74,7 @@ categories: ["database"]
- 创建普通用户 mortal切换到 mortal 用户下
```bash
useradd -m mortal
echo -e 'lijc hard nofile 5120\nlijc soft nofile 5120\n' \
echo -e 'mortal hard nofile 5120\nmortal soft nofile 5120\n' \
> /etc/security/limits.d/mortal
su - mortal
```
@ -105,6 +105,7 @@ categories: ["database"]
lower-case-table-names = 1
```
### 初始化基础数据
- 初始化实例的数据目录
```bash
/mysql57/bin/mysqld \
@ -112,16 +113,19 @@ categories: ["database"]
--initialize-insecure
```
### 启动 mysql
- 启动实例
```bash
/mysql57/bin/mysqld --defaults-file=/home/mortal/mysql-6033/my.cnf --daemonize
```
### 设置 root 密码
- 设置 mysql root 账户的密码
```bash
/mysql57/bin/mysqladmin -S /home/mortal/mysql-6033/sock password
```
### 客户端链接
- 使用本机客户端登陆 mysql root 账户
```bash
/mysql57/bin/mysql -S /home/mortal/mysql-6033/mysqld.sock -p