[root@localhost xiongjiajia]# vim /etc/my.cnf
#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
sql_mode=NO_ENGINE_SUBSTITUTION
[root@localhost xiongjiajia]# service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
[root@localhost xiongjiajia]# mysqladmin -u root password 123456
[root@localhost xiongjiajia]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.6.31 MySQL Community Server (GPL)
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> insert into mysql.user(Host,User,Password) values("%","xiongjiajia",password("123456"));
Query OK, 1 row affected, 3 warnings (0.00 sec)
mysql> select host,user,password from mysql.user;
+-----------------------+-------------+-------------------------------------------+
| host | user | password |
+-----------------------+-------------+-------------------------------------------+
| localhost | root | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| localhost.localdomain | root | |
| 127.0.0.1 | root | |
| ::1 | root | |
| localhost | | |
| localhost.localdomain | | |
| % | xiongjiajia | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+-----------------------+-------------+-------------------------------------------+
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on *.* to xiongjiajia@"%" identified by "123456" ;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
[root@localhost xiongjiajia]# firewall-cmd --zone=public --add-port=3306/tcp --permanent
success
[root@localhost xiongjiajia]# firewall-cmd --reload
success
相关推荐
申延超 Cent OS 5 Linux NFS 服务 安装
cent os cent os
Cent OS 下安装oracle 10 详细步骤以及 出现的问题 的解决方法
linux 从入门到大神。红帽认证的必学书目
本文详细说明Mysql5.6 在Linux上安装的详细步骤,每一步骤都详细说明及截图,绝对一次到位。
Linux(Cent OS7.2)下启动停止memcached方法及ps命令使用讲解.docx
cent OS7无网络安装redis
里面有安装cent-os全过程,有44张截图,安装的每一个步骤都有图。
2.6.0源码编译生成的lib包目录。替换官网下载的资源里的lib目录即可
Cent OS上 Redis的安装部署(最新详细教程)里面所有需要用到的软件
Cent OS上配置Apache2 + SVN Cent OS上配置Apache2 + SVN
cent7.x安装mysql5.6-全
1.简述Linux文件系统通过i节点把文件的逻辑结构和物理结构转换的工作过程。参考答案:Linux通过i节点表将文件的逻辑结构和物理结构进行转换。i节点是一个64字节长的表,表中包含了文件的相关信息,其中有文件的大小...
Cent OS 配置日志服务器和配置详解
一个指导完全安装ntfs支持的cent os系统
## vagrant-LNMP Vagrant自动配置LNMP开发环境 ###软件信息 Cent OS 7 PHP 5.6 MySQL 5.6 Nginx 1.6 Rabbitmq ###帐号 root帐号密码: vagrant ###启动方式 $ vagrant up $ vagrant ssh
linux下dhcp对client的MAC进行控制,只运行加入访问列表的主机获取ip地址,禁止没有加入列表MAC主机获取ip; shell脚本为自动发现新加入主机MAC地址并加入运行列表, add为shell脚本 class为允许列表 dhcp.conf为主...
桌面\cent0S linux\學生用伺服器建置流程(CentOS 5 版).htm
Cent OS6.5 安装nodeJS(分分钟搞定)
Linux系统,CentOS7是mini版本,几百M大小,可以搭建Linux服务器环境。比ubuntu的Linux系统小型很多。适合程序员部署相关服务。