MySQL密码
默认密码为空时设置密码:
mysqladmin -u root -p password mypasswd
输入这个命令后,需要输入root的原密码(空的),然后root的密码将改为mypasswd。
修改密码:
mysql -u root -p 先用旧密码登录
mysql> use mysql;
mysql> update user set Password = PASSWORD(‘新密码’) where User =’root’;
各个服务操作命令汇总:
nginx:
/etc/init.d/nginx start/stop/restart/reload)
apache:
/etc/init.d/httpd start/stop/restart/…
mysql:
/etc/init.d/mysqld start/stop/restart/…
如何配置 mysql 远程连接
默认安装的 mysql,出于安全考虑,只能本地连接。如果您需要远程连接,这里就需要设置一下 mysql 的权限表。具体设置的步骤如下:
进入服务器命令行:
mysql -uroot -p 密码
mysql>grant all on . to root@”%” identified by “密码”;
mysql>flush privileges;
服务器命令下载JDK: wget –no-cookies –header “Cookie: oraclelicense=accept-securebackup-cookie;” http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-i586.tar.gz