tagline: From openSUSE
|Tested on openSUSE||Recommended articles||Related articles|
Starting from openSUSE 11.3, openSUSE has multiple MySQL variants included. You can install whichever you want, but installing just "mysql" is still possible. It will install the prefered provider which is currently MySQL Community Server. You can always switch to any alternative later.
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
To make it run, the so called daemon for MySQL (mysqld) must be running. mysqld can be started manually by calling
with root privileges. You can check whether it is running by using
or make it stop by using
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
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:
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!