标签归档:mysql

wordpress重置管理员密码

在mysql中:

UPDATE wp_users SET user_pass = ‘5d41402abc4b2a76b9719d911017c592′ WHERE wp_users.user_login =’admin’ LIMIT 1;

5d41402abc4b2a76b9719d911017c592 == hello

Advertisements

Fedora安装MySQL与MySQL基本操作存档

如果在源代码编译未安装成功的情况,用yum安装是比较好的选择,特别是对新手来说,

是很好的选择,安装的过程很简单,

只要输入:# sudo yum -y install mysql-server ,系统自动下载和安装Mysql的,

# sudo chkconfig –add mysqld 在服务清单中添加mysql服务

# sudo service mysqld start 服务启动

mysqladmin -u root password ‘newpassword’ 更改密码

mysql -u root -p 登录数据库

mysql> DROP DATABASE test; 删除test数据库

mysql> DELETE FROM mysql.user WHERE user = ”; 删除匿名帐户

mysql> FLUSH PRIVILEGES; 重载权限

添加mysql用户:GRANT ALL PRIVILEGES ON my_db.* TO ‘user’@’localhost’ IDENTIFIED BY ‘password’;

# sudo service mysqld restart 重启服务

# sudo service mysqld stop 关闭服务

/etc/rc.d/init.d/mysqld status 查看mysql状态

# sudo chkconfig –del mysqld 删除服务清单中mysql服务

chkconfig –list 察看mysql是否在自动启动列表中

#sudo /etc/init.d/mysqld start 启动mysql服务

#sudo /etc/init.d/mysqld stop 关闭mysql服务

#sudo /etc/init.d/mysqld restart 重启mysql服务

/usr/bin/mysqladmin -u root -p’password’ shutdown关闭mysql服务