mysql-5.7.9安装
版本:mysql-5.7.9-linux-glibc2.5-x86_64.tar.gz(编译版本)
解压: tar -zxvf mysql-5.7.9-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.7.9-linux-glibc2.5-x86_64 /data/mysql
创建用户:
sudo groupadd mysql
sudo useradd -g mysql -d /home/mysql mysql
初始化:
./bin/mysqld --user=mysql --basedir=/data/mysql --datadir=/data/mysql/data --initialize
#打印信息:
2016-12-28T08:45:27.382016Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-12-28T08:45:27.386016Z 0 [Warning] One can only use the --user switch if running as root 2016-12-28T08:45:28.032586Z 0 [Warning] InnoDB: New log files created, LSN=45790
2016-12-28T08:45:28.404826Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-12-28T08:45:28.457748Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: fbb95bce-ccd9-11e6-84f8-326539313031.
2016-12-28T08:45:28.462726Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2016-12-28T08:45:28.465159Z 1 [Note] A temporary password is generated for root@localhost: U#jhFavOj88W(初始化的密码)
开启mysql:
./support-files/mysql.server start
报错:
./support-files/mysql.server: line 276: cd: /usr/local/mysql: No such file or directory
Starting MySQL ERROR! Couldn't find MySQL server (/usr/local/mysql/bin/mysqld_safe)
mysql的tar.gz安装包的默认安装目录为/usr/local/mysql, 这时候我们需要修改/support-files/mysql.server文件的basedir和datadir目录路径为我们环境所在的mysql的basedir和datadir路径
创建软连接:
ln -s /home/mysql/bin/mysql /usr/bin/mysql
复制配置文件到etc/
sudo cp support-files/my.cnf /etc/my.cnf
开机启动:
cp /home/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod 755 /etc/init.d/mysqld
# chkconfig --list mysqld
# chkconfig --add mysqld
# chkconfig --level 345 mysqld on
开启:
service mysqld start
cd /home/mysql
开启:
# ./bin/mysqld_safe --skip-grant-tables --skip-networking&
[1] 6225
[root@localhost mysql]# 151110 02:46:08 mysqld_safe Logging to '/home/mysql/data/localhost.localdomain.err'.
151110 02:46:08 mysqld_safe Starting mysqld daemon with databases from /home/mysql/data
登录设置密码:
# mysql -u root mysql
update user set authentication_string = PASSWORD('123456') where user = 'root'
service mysqld start
登录:mysql -uroot -p
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
解决办法:
ALTER USER 'root'@'localhost' IDENTIFIED BY '*********'
mysql-5.7.9安装的更多相关文章
- mysql 5.6.24安装实例
安装前准备工作: 1)编辑PATH路径 vim /etc/profile PATH=/home/mysql/bin:/home/mysql/lib:$PATH export PATH 2)生效PATH ...
- mysql 5.0.46安装配置
http://os.chinaunix.net/a2008/0801/986/000000986346.shtml RPM包和源码包存放位置 /usr/local/src 源码包编译安装位置(pref ...
- WAMP(Windows、Apache、MySQL、php)安装配置过程常见问题
WAMP(Windows.Apache.MySQL.php)安装配置过程 可以参考该网友的总结(总结的不错,鼓掌!!): http://www.cnblogs.com/pharen/archive/2 ...
- Linux下查看mysql、apache是否安装,安装,卸载等操作
Linux下查看mysql.apache是否安装,并卸载. 指令 ps -ef|grep mysql 得出结果 root ? :: /bin/sh /usr/ ...
- MySQL学习笔记01-MYSQL安装
一 MySQL简介 MySQL是一个关系型数据库管理系统,由瑞典 MySQL AB 公司开发,目前属于 Oracle 公司. MySQL 最流行的关系型数据库管理系统. MySQL分为企业版和社区版. ...
- Mac 下 Nginx、MySQL、PHP-FPM 的安装配置
用了3年多的本本罢工,最近新入手了一台 rmbp,一堆工作环境要配置,LNMP 里的 NMP 是常规要安装的,恰好也是第一次在 mac 上安装配置 nginx.mysql.php,所以顺便做个记录,免 ...
- CentOS 5.5 Nginx+JDK+MySQL+Tomcat(jsp)成功安装案例
在CentOS 5.5中安装Nginx+jdk+mysql+tomcat是非常容易的.只需yum安装环境包和nginx.解压安装jdk和tomcat.配置profile文件.server.xml和ng ...
- MySQL Server 5.5安装中遇到的问题及解决方法
之前开始用师兄用过的电脑工作,各种不适应,开始重新搭建自己习惯的环境,重装MySQL就是其中一项,然后重装过程中遇到了问题,具体情况总结如下: 1.以前也重新安装过MySQL,但是完全没有用过就直接卸 ...
- Mysql ubuntu下的安装卸载
删除 mysql sudo apt-get autoremove --purge mysql-server-5.0sudo apt-get remove mysql-serversudo apt-ge ...
- MySQL解压版安装配置详解
MySQL解压版安装起来比较简单,步骤相对较少.下面我们就来详细介绍一下如何在windows操作系统上安装解压班的MySQL. 1.下载解压版MySQL,地址:http://downloads.mys ...
随机推荐
- Swift语言之类型方法
Swift语言有很多特性,其中之一就是类型方法,相对于其他比较流行的编程语言(C#.Java),在Swift中类型方法最大的特征在于它的可继承性,我们举个例子说明: 俗话说,龙生龙凤生凤老鼠生儿会打洞 ...
- 干货——myeclipse快捷键
好了废话不多说.先上快捷键快捷键 alt alt+ 返回操作记录的上一步 alt+ 返回操作记录的下一步 alt+shift+o 同一 ...
- Dynamics AX 2012 R2 AIF 内部异常
今天,Reinhard发现某个入站端口,突然一直报错: The server was unable to process the request due to an internal erro ...
- CAS示例环境部署及配置
http://wenku.baidu.com/link?url=d6JjWqOtuUediSkV18XagtVG9lVC2hTiaIEimfIgv1PIW8RMA1sXeIqqtJkW90lleYPQ ...
- java 7中文件的复制移动
在java 7 中文件移动复制简单方法 文件移动 Path source=Paths.get("D:\\sa\\123.txt"); Path target=Paths.get(& ...
- 基于webrtc的资源释放问题(二)
基于webrtc的资源释放问题(二) ——建立连接的过程中意外中断 应用背景: 我们在打电话的时候会不会遇到这种情况?打电话的时候未接通之前挂掉了电话,或者在接通之后建立的连接的过程中挂掉电话? 特别 ...
- AngularJS中多个ng-app(手动加载模块)
1.当有多个ng-app时:(首先是要加载angularJS) <div ng-app=""> <p>姓名:<input type="tex ...
- win7和u盘redhat7.1双系统安装总结
最近win7系统越用越卡,又没钱买mac只能想办法装以下linux系统,听说redhat服务器用的比较多,就想尝试一下装一个redhat.当然,和所有人一样,搜索了很多资料.我选择装双系统,因为要抛弃 ...
- SQL中常用模糊查询的四种匹配模式&&正则表达式
执行数据库查询时,有完整查询和模糊查询之分.一般模糊语句如下:SELECT 字段 FROM 表 WHERE 某字段 Like 条件 其中关于条件,SQL提供了四种匹配模式:1.%:表示任意0个或多个字 ...
- grep命令
grep (缩写来自Globally search a Regular Expression and Print)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来. grep ...