Mandriva – Installing and configuring a MySQL database server and an Apache web server with PHP support.

Hi, in this tutorial I’ll show to you how easy is to setup a LAMP web server with Mandriva Linux, just pay attention and do the steps carefully.

To make things crystal clear all the commands you have to use are in italic and the steps in bold.

Everything will be done using the root account, so open up a terminal and login as root.

Logging as system administrator

$ su

Type your root password.

First of all, you will download the apache web server, apache php module, MySQL Daemon and a tool to administrate you database, called PHPMyAdmin.

Installing all packages

# urpmi apache-mpm-prefork apache-mod_php mysql phpmyadmin –auto

If everything went right you have just downloaded and installed everything you need, if something went wrong or you have any question in this step, just ask in a comment!

In the following you are going to start the MySQL Daemon and then setup a password for the MySQL root user. This user and password you will user everything you login on the PHPMyAdmin panel to configure and administrate your databases.

Starting the MySQL Daemon

# /etc/init.d/mysqld restart

Creating a password for the MySQL root user

# /usr/bin/mysqladmin -u root password YOUR_NEW_PASSWORD

Ok, at this moment you are able to use and connect to your very own MySQL server!

Again, any error or question, just ask!

Now you will start the Apache Web Server and create a new MySQL user and database, using the phpmyadmin tool, it is really easy.

Starting up the apache web server

# /etc/init.d/httpd restart

You might get an error message here related to your hostname, you need to have a “qualified” host name, as “myserver” or “johnpc” or whatever but “localhost”. If you hostname is “localhost”, you have to change it, to do so, you can either use the drakconnect tool or drakhost. Any question, ask.

You are almost there, in the following you will finally create a new user and a new database.

Opening the phpmyadmin page

Open your browser and go to

Go to “Privileges” Tab

Click on “Add a new User”

In “User name:” Put the username you want to use for you service/database, your database name will have the same name.

Write a new password at “Password:” and retype it. I can be the same password as above.

Now, in “Database for user” choose “Create database with same name and grant all privileges”.

And finally at “Global privileges” click on “Check all” and then on the button “Go”.

Further information:

Ok, at this point you have both Apache and MySQL up and running.

The database address you will use in you website, wordpress, media wiki or whatever will be localhost.

The username you created above is the username you will put on the username box.

Password on the password box and database name on the database box, did you get it?

Questions? Suggestions? Comment!

Did you like this tutorial? Download it in PDF!.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s