Set the password for the root user in MySQL.
# ./bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.0.45-log MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('password');
Query OK, 0 rows affected (0.00 sec)
mysql> SET PASSWORD FOR 'root'@'HostName-01' = PASSWORD('password');
Query OK, 0 rows affected (0.01 sec)
mysql> exit
Bye
#
|
Set environment parameters for the MySQL script.
Change the file /opt/MySQL/support-files/mysql.server:
basedir=/opt/MySQL datadir=/opt/MySQL/data ... basedir=/opt/MySQL bindir=/opt/MySQL/bin # cp /opt/MySQL/support-files/mysql.server /etc/sfw/mysql |
Start the MySQL server.
# cd /opt/MySQL # ./bin/mysqld_safe --user=mysql --log& [1] 7764 # Starting mysqld daemon with databases from /opt/MySQL/data # |