重置DirectAdmin安装的Mysql的Root密码,并运行Mysql_secure_installation

DirectAdmin默认会安装WEB环境,装完的MYSQL没有给我们root密码,没法直接运行mysql_secure_installation。怎么办呢? 以下就是解决办法: 1.获得directadmin的mysql管理员密码。 路径是/usr/local/directadmin/conf/mysql.conf 2.利用mysql已经创建的MYSQL管理员账户重置ROOT密码。 mysql -u da_admin -p mysql> SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘newpass’); 3.运行mysql_secure-installation 会提示输入root密码,输入你刚刚重置的密码即可。 PS:转载请注明出处,谢谢! Read More

Debian/Ubuntu更换网卡换IP完美解决方案

第一步:修改网卡信息   修改文件/etc/udev/rules.d/z25_persistent-net.rules 文件,原来为: protime-linux:/etc/udev/rules.d# cat z25_persistent-net.rules# This file was automatically generated by the /lib/udev/write_net_rules# program, probably run by the persistent-net-generator.rules rules file.## You can modify it, as long as you keep each rule on a single line.# MAC addresses must be written in lowercase.# PCI device 0x1022:0x2000 (pcnet32)SUBSYSTEM==”net”, DRIVERS==”?*”, ATTRS{address}==”00:0c:29:15:3a:48″, NAME=”eth0″# PCI device 0x1022:0x2000 (pcnet32)SUBSYSTEM==”net”, DRIVERS==”?*”, Read More