时间:2021-07-01 10:21:17 帮助过:25人阅读
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
(2) 用SET PASSWORD命令
首先登录MySQL。
格式:mysql> set password for 用户名@localhost = password(‘新密码‘);
例子:mysql> set password for root@localhost = password(‘123‘);
mysql刷新权限命令:FLUSH PRIVILEGES;(一般用于数据库用户信息更新后)
遇到问题重启机器可能会解决!!!
七、my.cnf配置
vim /etc/my.cnf
-------------------------------------------------
[mysqld]
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
port=3380
server_id=1
socket=/usr/local/mysql/mysql.sock
user=mysql
[client]
socket=/usr/local/mysql/mysql.sock
[mysql]
socket=/usr/local/mysql/mysql.sock
-------------------------------------------------
which mysqld
/usr/local/mysql/bin/mysqld --verbose --help |grep -A 1 ‘Default options‘
#命令来查看mysql使用的配置文件默认路径,(注意红色标注的是通过步骤1的命令获取到的mysql安装目录路径)
cp -r /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf
#拷贝配置文件到/etc下面
MariaDB简易安装部署步骤
标签:help dir 初始 sbin 最小化 无法启动 ncurses yum安装 pre