摘要:
删除匿名用户在MySQL刚刚被安装后,存在用户名、密码为空的用户。这使得数据库服务器有无需密码被登录的可能性。为消除隐患,将匿名用户删除。[root@sample ~]# mysql -u root -p ← 通过密码用root登录Enter password: ← 在这里输入密码Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 7 to server version: 4.1.20Type 'help;' or '\h' for help. T 阅读全文
摘要:
mysql>set password =password('你的密码');mysql>flush privileges;2.使用GRANT语句 mysql>grant all on *.* to 'root'@'localhost' IDENTIFIED BY '你的密码'with grant option ;mysql>flush privileges;3.进入mysql库修改user表mysql>use mysql;mysql>update user set password=passwor 阅读全文
摘要:
#用户 用户组 user www www; #工作进程,根据硬件调整,有人说几核cpu,就配几个,我觉得可以多一点 worker_processes 5; #错误日志 error_log logs/error.log; #pid文件位置 pid logs/nginx.pid; worker_rlimit_nofile 8192; events { #工作进程的最大连接数量,根据硬件调整,和前面工作进程配合起来用,尽量大,但是别把cpu跑到100%就行 worker_connections 4096; }... 阅读全文
摘要:
安装MySQL。[root@sample ~]# yum -y install mysql-server ← 安装MySQL[root@sample ~]# yum -y install php-mysql ← 安装php-mysql配置MySQL[root@sample ~]#vim /etc/my.cnf ← 编辑MySQL的配置文件[mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sock# Default to using old password format for compatibility with mys... 阅读全文