MySQL install
Last modified on July 24, 2026 • 2 min read • 282 wordsAfter installing the Suse 9 mysq-server rpm, execute the following commands.
Creating default databases & permissions. Apparently the same can be done by “sudo rcmysql start”):
sudo /usr/bin/mysql_install_dbStart the server for the first time
sudo /usr/bin/mysqld_safe --user=mysql &REMEMBER TO SET A PASSWORD FOR THE MySQL root USER! This is done with:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h hostname password 'new-password'Give all privileges to root and user:
/usr/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 6 to server version: 4.0.15 Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT ALL PRIVILEGES ON *.* TO user@localhost IDENTIFIED BY 'Password' WITH GRANT OPTION; Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO user@'%' IDENTIFIED BY 'Password' WITH GRANT OPTION;Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'Password' WITH GRANT OPTION; Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'Password' WITH GRANT OPTION; Query OK, 0 rows affected (0.00 sec)
mysql> quit
ByeWhat mysql version are you running?
/usr/bin/mysqladmin [-u root -p] versionHow is your mysql server configured (gives you too much output, needs to be filtered)?
/usr/bin/mysqladmin [-u root -p] variablesCan you shutdown the server?
/usr/bin/mysqladmin -u root -p shutdownCan you start the server?
sudo /usr/bin/mysqld_safe --log &Check whether the server process is running:
ps -A | grep mysqlShow all databases:
/usr/bin/mysqlshow -u root -pShow the tables of database “mysql”:
/usr/bin/mysqlshow -u root -p mysqlTo start the mysql daemon at system startup, you should go to the runlevel editor (advanced mode) and toggle the status for the mysql entry of init.d