mysql各个版本html
官网下载地址mysql
http://dev.mysql.com/downloads/mysql/linux
各个版本安装请看官方教程sql
http://dev.mysql.com/doc/refman/5.7/en/installing.htmlshell
请选择本身安装的版本windows
window zip安装安全
若是你中途安装有问题就remove掉mysql吧服务器
从新安装吧spa
linux下mysql的安装code
来看官方文档吧
http://dev.mysql.com/doc/refman/5.7/en/linux-installation-rpm.html
初始密码和修改密码
A superuser account 'root'@'localhost'
is created. A password for the superuser is set and stored in the error log file. To reveal it, use the following command for RHEL, Oracle Linux, CentOS, and Fedora systems:
shell> sudo grep 'temporary password' /var/log/mysqld.log
Use the following command for SLES systems:
shell> sudo grep 'temporary password' /var/log/mysql/mysqld.log
The next step is to log in with the generated, temporary password and set a custom password for the superuser account:
shell> mysql -uroot -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';
这个也是官方 ,
在linux下面的mysql若是须要远程访问的话须要配置ip地址的
你想root使用password从任何主机链接到mysql服务器的话。
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; |
若是你想容许用户myuser从ip为192.168.100.120的主机链接到mysql服务器,并使用mypassword做为密码
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.100.120' IDENTIFIED BY 'password’ WITH GRANT OPTION; |
若是你有什么问题话 请留言吧