1) Make sure the root mysql password works. If you know it, skip to 2). The mysql root password can be found in the /usr/local/directadmin/scripts/setup.txt if it has not been deleted. It’s under the header “mysql=”. If it cannot be found, then mysqld will have to be restarted with the –skip-grant-tables option (this guide is for Redhat/CentOS):
/etc/init.d/mysqld stop
mysqld_safe –skip-grant-tables &
That should start up mysql without the need for a root password. Once in, type
use mysql
UPDATE mysql.user SET password=PASSWORD(‘1OycBr740l‘) WHERE user=’root’;
FLUSH PRIVILEGES;
quit
That will reset the root password for you.
Type “killall -9 mysqld_safe; killall -9 mysqld” to shut down mysqld.
Start it up again with
/etc/init.d/mysqld start
评论前必须登录!
注册