Some common O & M Records of linuxmysql, bitsCN.com
Common O & M Records for linux mysql
// Stop mysql
# Service mysqld stop
// Start mysql in safe mode and skip permission check
# Mysqld_safe -- user = mysql -- skip-grant-tables &
// Log on to the mysql console
Mysql
// Modify all root passwords
Mysql> update user set password = password ('newpassword') where user = 'root ';
// Refresh authorization
Mysql> flush privileges;
// Exit
Mysql> quit
// Restart mysql
# Service mysqld restart
// Assign all databases to the root user on 192.168.248.71
Mysql> grant all privileges on *. * to 'root' @ '192. 168.248.71 'identified by 'root' with grant option;
// Configure the firewall to allow port 3306
# Vi/etc/sysconfig/iptables
Add
-A RH-Firewall-1-INPUT-m state-state NEW-m tcp-p tcp-dport 3306-j ACCEPT
// Restart the firewall
# Service iptables restart
BitsCN.com