From the command-line:
. /data/wre/sbin/setenvironment.sh
mysqladmin -u root -p oldpassword newpass
Forgotten Password:
...
[mysqld]
# this line for using mysqld without password
skip_grant_tables
...
linuxuser> mysql -u root mysql
Change password for localhost and host:
mysql> UPDATE user SET password=PASSWORD('new password')
WHERE user='root' AND host='localhost';
mysql> UPDATE user SET password=PASSWORD('new password')
WHERE user='root' AND host='your_hostname';
mysql> quit;
...
[mysqld]
# this line for using mysqld without password
# skip_grant_tables
...
Login to mysql as root:
show grants for 'poqlzsxjznphleb';
It's important to run a database check if you ever have an unexpected server outage or if you suspect table corruption.
1. Shutdown modperl:
/data/wre/sbin/wreservices.pl --stop modperl
2. Run the check with auto-repair:
mysqlcheck -c -v -p --auto-repair --all-databases
3. Restart modperl:
/data/wre/sbin/wreservices.pl --start modperl
You will get a report at the end of what tables were repaired and the status of the repaired tables. You may also need to shutdown SPECTRE and any other applications that are trying to connect to the database. See the MySQL manual for more details.
Keywords: mysql