网站操作笔记

删除网站:lnmp vhost del

新增网站:lnmp vhost add

绑域名:www.adc.com 问add more?yes,输abc.com

忘记PHPMYADMIN的root密码

修改 /etc/my.cnf
在[mysqld] 中添加skip-grant-tables一行,保存。
重启 /etc/init.d/mysql restart

[root@localhost ~]# /usr/bin/mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.95 Source distribution
Copyright (c) 2000, 2011, 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> 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 Password = password ( ‘要改的密码’ ) WHERE User = ‘root’ ;
Query OK, 3 rows affected (0.00 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> flush privileges ;
Query OK, 0 rows affected (0.00 sec)
mysql> quit
Bye
编辑/etc/my.cnf 文件
把开始添加的skip-grant-tables一行删除,然后保存退出。

再重启 /etc/init.d/mysql restart

Leave a Reply