MySQL

From openSUSE


"World's most popular open source database." is MySQL's current claim to fame. It famously hosts some of the biggest databases in the world and is renowned for high performance. It is commonly used as a back-end for dynamic websites and constitute the M the LAMP stack (Linux Apache MySQL PHP).


Contents

Installing MySQL

Due the fact that Novell offers the MySQL server and client in their installation repository and the Build service has now a repository for the newest versions, manual installation is skipped.

MySQL server from installation repository

Simply install the MySQL server by selecting them in YaST or other package manager. OpenSUSE will now install the MySQL server which is being shipped with the current OpenSUSE version. From this point the MySQL server is only installed, but not configured or running. The next step is to make the MySQL server run.

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. YaST will give a warning that a password for MySQL root user (administrator) must be set.

Warning !   If MySQL administrator (root) password is not set anyone can access database as root, read and change data, delete them, set root and user passwords and lock you out!

This is not operating system root user, but MySQL root (the same name can be confusing) and you can use a normal user account to create it:

mysqladmin -u root password <yourpassword>

From this point OpenSUSE has a properly configured MySQL server.

MySQL clients

Beside a server, a client is needed to make connection to the MySQL server. OpenSUSE offers several clients from its official repository. The most famous is the shell client from MySQL itself, but also the graphical MySQL query browser from MySQL is offered. A note should be made that it is not necessary to install a client to configure or run the MySQL server. Same way that a MySQL server is not needed for a client. This page will describe the clients offered within the official SUSE installation repository only.

Basic shell client

This is the regular MySQL client developed by MySQL itself. It runs from a shell like Konsole and has no graphical user interface. Ideal for small adjustments within the MySQL server. This client is called mysql-client in YaST.

MySQL Tools

MySQL developed three MySQL clients which are available in the official SUSE installation repository.

  • MySQL Query Browser is fully graphical client to maintain the tables within the MySQL server. It is primarily developed for data management, not for controlling the server. Therefore is the next tool created.
  • MySQL Administrator is a powerful tool to check the status of the MySQL server with. Users, health-status, usage, and more can be monitored with the MySQL Administrator. This tool also has an advanced user management en database controller.

phpMyAdmin

phpMyAdmin is not an application but a website. You need a running webserver with PHP installed to run the phpMyAdmin website. PhpMyAdmin is ideal for webhosters or maintaining the MySQL server over the Internet. If you are using the MySQL server on the localhost or within a local network on the other hand, it is better to use a graphic client like MySQL Query Browser then to setup a webserver with PHP to run PHPMyAdmin in. This saves the need to install and maintain a webserver and is above all faster, even within a local network, than phpMyAdmin.

OpenSUSE repositories for the newest MySQL versions

server:/database

See also

Databases

Tools