标签:mysql art 启动 read temporary oca roo ble path
zip
)MYSQL_HOME
变量值为zip解压目录)%MYSQL_HOME%\bin;
mysqld --initialize --console
mysqld --install 服务名 --服务名可省略
net start mysql
sc delete mysql
HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services/Eventlog/Application/MySQL
HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services/Eventlog/Application/MySQL
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Eventlog/Application/MySQL
不是有效的win32程序
删除bin目录下名为mysqld的文件(大小为0k)。
# 修改加密规则(`root`:用户名; `passwor`d:密码; `localhost`:开放的 ip,开放所有 ip 使用 `%`)
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘password‘ PASSWORD EXPIRE NEVER;
# 更新一下用户的密码
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘password‘;
# 刷新权限
FLUSH PRIVILEGES;
# 登录
mysql -u root -p
# 显示已有数据库
show databases;
# 使用mysql库
use mysql;
# 修改密码
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘new password‘;
# 退出
quit
rpm
)执行如下命令安装
wget http://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm
yum localinstall mysql80-community-release-el7-1.noarch.rpm
yum install mysql-community-server
安装完成后,默认路径如下:
/usr/share/mysql
mysqldump
文件位置: /usr/bin/mysqldump
/etc/my.cnf
/var/lib/mysql
启动 mysql
# 启动
service mysqld start
# 查看运行状态
service mysqld status
修改初始密码
# 查看随机生成密码
grep ‘temporary password‘ /var/log/mysqld.log
# 登录
mysql -uroot -p
# 修改密码(需包含大写字母、小写字母、数字和特殊字符,并且长度不小于8位)
ALTER USER ‘root‘@‘localhost‘ IDENTIFIED BY ‘密码!‘;
注意版本问题,可以避免大多数问题。
报 Please read "Security" section of the manual to find out how to run mysqld as root!
错误
--user=root
参数。 (强制使用系统root
用户初始化,不推荐)报 Can‘t open the mysql.plugin table. Please run mysql_upgrade to create it.
错误
进入mysql安装目录,执行 mysql_install_db
命令。
标签:mysql art 启动 read temporary oca roo ble path
原文地址:https://www.cnblogs.com/wscy/p/9991303.html