Mysql 5.7 Linux安装详细步骤
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Mysql 5.7 Linux安装详细步骤,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2610字,纯文字阅读大概需要4分钟。
内容图文
![Mysql 5.7 Linux安装详细步骤](/upload/InfoBanner/zyjiaocheng/473/d02813c24cdf4a93a6a83819bc8fb1f6.jpg)
[root@localhost mysql]#
[root@localhost mysql]# cp -a ./support-files/my-default.cnf /etc/my.cnf
[root@localhost mysql]# cp -a ./support-files/mysql.server /etc/init.d/mysqld
[root@localhost mysql]# cd bin/
[root@localhost bin]# ./mysqld_safe --user=mysql &
[1] 2932
[root@localhost bin]# 2016-06-01T22:27:09.708557Z mysqld_safe Logging to ‘/usr/local/mysql/data/localhost.localdomain.err‘.
2016-06-01T22:27:09.854913Z mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
[root@localhost bin]# /etc/init.d/mysqld restart
Shutting down MySQL..2016-06-01T22:27:50.498694Z mysqld_safe mysqld from pid file /usr/local/mysql/data/localhost.localdomain.pid ended
SUCCESS!
Starting MySQL. SUCCESS!
[1]+ Done ./mysqld_safe --user=mysql
[root@localhost bin]#
//设置开机启动
[root@localhost bin]# chkconfig --level 35 mysqld on
[root@localhost bin]#
6.初始化密码 mysql5.7会生成一个初始化密码,而在之前的版本首次登陆不需要登录。
[root@localhost bin]# cat /root/.mysql_secret
# Password set for user ‘root@localhost‘ at 2016-06-01 15:23:25
,xxxxxR5H9
[root@localhost bin]# ./mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.12
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.
mysql> SET PASSWORD = PASSWORD(‘123456‘);
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
7.添加远程访问权限
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> update user set host = ‘%‘ where user = ‘root‘;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> select host, user from user;
+-----------+-----------+
| host | user |
+-----------+-----------+
| % | root |
| localhost | mysql.sys |
+-----------+-----------+
重启生效
/etc/init.d/mysqld restart
come from:http://blog.csdn.net/wb96a1007/article/details/51559741
Mysql 5.7 Linux安装详细步骤
标签:boot xxxx my.cnf copyright har local rest mysql 5.7 修改
本文系统来源:http://www.cnblogs.com/seasonzone/p/6126479.html
内容总结
以上是互联网集市为您收集整理的Mysql 5.7 Linux安装详细步骤全部内容,希望文章能够帮你解决Mysql 5.7 Linux安装详细步骤所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。