phpMyAdmin on CentOS 7

phpmyadmin-loginThis is the story of an installation. I try, I fail, I fix it. I tell the story of this adventure. So let’s start by yum it

## > yum install phpMyAdmin

then it’s configuring time. I will skip that for the moment, and copy one of phpMyAdmin configuration files I have given. The result:

You don’t have permission to access /phpMyAdmin on this server.

is not very promising. I edit the corresponding file, sitting on

/etc/httpd/conf.d/phpMyAdmin.conf

and open all the permissions (change on the file the “requires” and “allows” to Require all granted, Allow from All), I restart httpd service(systemctl restart httpd), but still no luck. So what’s wrong? Is it the apache configuration? Is it a missing package? is it the color of your eyes? Let’s check the packages.

yum install php

Works. I restart once more the httpd service (systemctl restart httpd) and voila! We have the above displayed login page. Now how to log in? I try as root, as root, empty password, and as root, password “password” without luck.  Time to go to stack overflow, that recommends

mysqladmin -u root -p pass

 unfortunately, we get command not found.  Do we have again something missing?

yum install mysql

And now, the command is there. But we can’t run it! The error reads:

## > mysqladmin -u root -p pass
Enter password: 
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: 
'/var/lib/mysql/mysql.sock' exists!

Let’s do what they ask me to do. I try to start the mysql daemon, and it turns out we don’t have a daemon.

## > systemctl start mysqld
Failed to start mysqld.service: Unit not found.

So let’s install more things.

yum install mariadb-server
## > systemctl start mariadb
## > mysqladmin -u root -p pass
Enter password: 
New password: 
Confirm new password:

And it works! I can log in, and start working again! Next step, upload an old (but complex) database from a CentOS 6 system onto the new CentOS 7. We’ll see how it goes 🙂

Advertisements

About bitsanddragons

A traveller, an IT professional and a casual writer
This entry was posted in bits, centos, linux. Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s