How to install MySQL on SUSE Linux Enterprise 11 1


There are several ways to install MySQL on a SUSE Server. For instance, it’s possible to use YaST 2 -both the visual interface and the text mode. Or we can download a rpm file in order to install the exact version we want (http://dev.mysql.com/downloads/repo/suse/).

But in this case, we are going to use Zypper. At the end of this guide, we will have correctly configured a MySQL Server. Create and accessing a database will be showed in another article.

1) Install MySQL package and its dependencies:

we should see something like:
mysql-suse-01

If we try to run mysql, surely, we will have the following error:

mysql-suse-02

2)  We need to run mysql start

3) and add MySQL to the System Services

4) Now, ea can login to MySQL

5) Inside the shell, we run a query:

We get:

mysql-suse-03

 Important:

As we can see, our database has two “security problems” (Someone may want this features on). a) an anonymous user (empty field) and
b) the root user has no password.

6) To delete the anonymous user:

7) To set a password for the root user.

In all this commands, we should have an output like this:

8) We can check our changes

And we will see a table with only the root user and its password (********).

We can logout and login -as root- again to verify our configuration.

This time we are asked for a password

mysql-suse-04

And… that’s all.

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS