mysql window/linux 安装及配置
2016-06-17 00:00
555 查看
摘要: mysql下面的安装教程mysql各个版本官网下载地址http://dev.mysql.com/downloads/mysql/各个版本安装请看官方教程http://dev.mysql.com/doc/refman/5.7/en/installing.html请选择自己安装的版本window zip安装下载window zip包解压到出来我安装在D盘中,然后在在文件中新建一个data文件夹
修改my-default.ini 配置
配置中反斜杠的使用,你可以在官方文档找到这个说明进入bin目录执行初始化操作
按照官方步骤这里需要开启服务首次(Starting the Server for the First Time)
然后安装
安装完成后 开启
由于mysql对于安全加强了,刚安装的时候会有一个初始的密码,该密码会记录在你创建的data/目录里面的一个xxxx.err文件中
拷贝密码的时候别吧空格拷进去了登入mysql我这里已经把我的密码修改成了root了
修改mysql密码
mysqladmin -u root -p password root1234 回车 输入旧的密码
我这里把原来的旧密码root改成了root1234了到此完成了mysql在window zip的安装以及配置了
这个是官方的安装文档
http://dev.mysql.com/doc/refman/5.7/en/windows-installation.html如果你中途安装有问题就remove掉mysql吧
重新安装吧linux下mysql的安装来看官方文档吧http://dev.mysql.com/doc/refman/5.7/en/linux-installation-rpm.html初始密码和修改密码A superuser account
mysql>
如果你想允许用户myuser从ip为192.168.100.120的主机连接到mysql服务器,并使用mypassword作为密码
如果你有什么问题话 请留言吧
![](http://static.oschina.net/uploads/space/2016/0617/122753_npzy_852445.png)
![](http://static.oschina.net/uploads/space/2016/0617/151621_159T_852445.png)
![](http://static.oschina.net/uploads/space/2016/0617/143538_sZwA_852445.png)
![](http://static.oschina.net/uploads/space/2016/0617/143822_NOMS_852445.png)
![](http://static.oschina.net/uploads/space/2016/0617/145318_Hz1L_852445.png)
![](http://static.oschina.net/uploads/space/2016/0617/145440_M5VY_852445.png)
![](http://static.oschina.net/uploads/space/2016/0617/145819_fHw3_852445.png)
![](http://static.oschina.net/uploads/space/2016/0617/150033_nfWO_852445.png)
mysqladmin -u root -p password root1234 回车 输入旧的密码
![](http://static.oschina.net/uploads/space/2016/0617/150259_ZXzL_852445.png)
这个是官方的安装文档
http://dev.mysql.com/doc/refman/5.7/en/windows-installation.html如果你中途安装有问题就remove掉mysql吧
![](http://static.oschina.net/uploads/space/2016/0617/152149_4Pai_852445.png)
'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> [code=plain]sudo grep 'temporary password' /var/log/mysqld.log[/code] Use the following command for SLES systems:
shell> [code=plain]sudo grep 'temporary password' /var/log/mysql/mysqld.log[/code] The next step is to log in with the generated, temporary password and set a custom password for the superuser account:
shell> [code=plain]mysql -uroot -p[/code]
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; |
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.100.120' IDENTIFIED BY 'password’ WITH GRANT OPTION; |
相关文章推荐
- linux下卸载mysql
- Linux中常用的查看系统信息的命令
- hadoop2.6Linux(centos)伪分布搭建
- Windows中查找命令的路径 (类似Linux中的which命令)
- linux下使用Java获取本机ip地址?
- linux运维实用的42个常用命令总结
- linux 使用ps,gdb调试程序
- 1、Ora_Q1_/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
- L1-01-iptables 开启与关闭
- PowerEdge r730xd 安装centos 6.7
- Linux环境进程间通信系列(一):管道及有名管道
- 为Linux应用构造有限状态机
- 2016-6-16 Linux开机示意图
- 第五部分 linux 按键驱动代码分析
- Linux常见基础命令总结(一)
- 第四部分 linux led驱动代码分析
- linux下乱码问题
- linux和window部署solr5.3.1
- lamp centos虚拟主机配置
- 每天学点Linux命令之 vi 命令