Running
After the installation of MySQL, it is only installed but it is not running.
You may want to change the location of the directory in the file /etc/my.cnf, where all the data will be stored by removing the '# ' and changing the directory in the line
# datadir = /var/lib/mysql
to i.e. /mysql/mysqltables. You need to create that directory first and give the command
# chown mysql:mysql /mysql/mysqltables
To make it run, the so called daemon for MySQL (mysqld) must be running.
mysqld can be started manually by calling
# rcmysql start
with root privileges. You can check whether it is running by using
# rcmysql status
or make it stop by using
# rcmysql stop
Another option is to start the daemon is during the boot.
Go to YaST -> System -> System Services (Runlevel). Wait a
few seconds before YaST has examined all the Runlevels. Then select
mysqld and press the enable button.
Alternatively, you can enable MySQL startup at boot time by issuing
# insserv mysql
Securing
Warning After
the installation,
MySQL runs with empty root password! So anybody can
do anything with your databases! Be sure to setup the root password
before making your machine publicly available!
MySQL contains script that performs some altering in your MySQL settings that it is more secure, but NOT the ultimate configuration, to use when connected to a network or Internet. It does NOT configure your firewall or attack detection!
The script will perform the following settings:
- set a MySQL root password
- remove anonymous users
- disallow MySQL root login remotely
- remove test databases
- reload privileges table
Be sure that MySQL server is running as described above before running this script.
Run then the script by:
# mysql_secure_installation
Now answer questions, and after that you have a "more" secure MySQL
server. Be still aware that the safety of the MySQL server still depends
on the security configuration of the network and openSUSE it is running
on!
Warning MySQL
administrator (root) password is not the same thing as the password for
the root account of your system! They are totally independent!