MySQL install

Last modified on July 24, 2026 • 2 min read • 282 words
After 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_db

Start 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
Bye

What mysql version are you running?

/usr/bin/mysqladmin [-u root -p] version

How is your mysql server configured (gives you too much output, needs to be filtered)?

/usr/bin/mysqladmin [-u root -p] variables

Can you shutdown the server?

/usr/bin/mysqladmin -u root -p shutdown

Can you start the server?

sudo /usr/bin/mysqld_safe --log &

Check whether the server process is running:

ps -A | grep mysql

Show all databases:

/usr/bin/mysqlshow -u root -p

Show the tables of database “mysql”:

/usr/bin/mysqlshow -u root -p mysql

To 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