MariaDB task failed due to erroneous "mariadb server is not installed on DB Server" failure reason

Hi @kodekloud-support3, @Inderpreet,

I just failed this task with a “mariadb server is not installed on DB Server” error. As you’ll see from all of the screenshots below, wp-config was successfully configured and mounted on all app severs and I was able to remotely connect to the DB server and view the restored DB from ALL app servers…





1 Like

I think you have to install and configure mariadb service in DB aka Database server but you configured in app server 1, 2 and 3. So that’s why error occured.

@Tej-Singh-Rana - thanks for the feedback, but your statement is only half-correct in my case. I installed MariaDB-server on stdb01 and granted remote access to the specified user on app servers 1, 2, and 3.

I only installed the MariaDB-client (the server was only installed on stdb01) on app server 1, 2, and 3 to verify that wordpress would be able to successfully connect from each of those hosts and to be able to obtain screenshot proof that the proper grants had been executed for remote access from each of those hosts.

Same case like me. The same output I had

@peterwhite Thanks for reporting this. This is marked as Success for you. Thanks for your patience.

Thanks @Inderpreet, much appreciated.

I was not able to copy the file over to DB server…tried local to remote and remote to local

scp db.sql root@ 172.16.239.10:/tmp/

scp -r thor@jump_host:/home/thor/db.sql /tmp

change the permission of folder that anonymous or other user can do perform that action.

if you the knew the password of target machine user of root.

scp db.sql [email protected]:/tmp/

  • if random user of db server like peter then before this, change the permission of that particular folder in db server. Because sometimes may not grant permission to perform action.
    scp db.sql [email protected]:/tmp/
    and share screenshot of errors if this not works
    @labheshp
    thanks,

I ran this command as well…

scp db.sql [email protected]:/tmp/

permmision denied error…not sure why it needs permision on /tmp

change the permission by chmod command .
$ chmod o+rwx /tmp/

For those having problems scp’ing files to remote hosts, here’s a couple thoughts and workarounds that I’ve successfully used…

  1. Verify whether scp exists on the remote host and install if missing
  2. scp as the user you use to ssh to the remote host, placing the files and that users’ home directory. You’ll have permission to do that - otherwise, you wouldn’t be able to ssh. Once there, you can move/rename the files as root using sudo…

How do you grant remote access to the specified user on app servers ? is that by adding theses lines in the /etc/my.cnf file of database :
skip-networking=0
skip-bind-address

This should help… How to Allow Remote Access to MariaDB in Ubuntu Linux - Geek Rewind

@peterwhite
Thank you

1 Like

You’re welcome, @bagam_fleury!

@peterwhite @Tej-Singh-Rana @Inderpreet @Lalit
I have copied the db.sql from jump host server to tmp folder on db server.
when I am trying to restore the db dump I am getting this error message.
any suggestions?

Hi @swaroopcs88. That command was meant to be executed at the Linux Bash prompt, not the MariaDB prompt.

try from bash terminal and a little bit search about how to take a backup of database in linux.I think mysql-dump something command will use, anyways you search and confirmed it. You will get a lot of hint from there. You are so close.

Thank you @peterwhite got my first 1000 points task correctly.

Asking basic questions, sorry about that.

copying from your screenshot mentioned above.
image

  1. what do the first three lines do?

  2. The below files were blank on stdb01. is that the case?

  3. How could I have verified this task? I browsed the below file from the terminal.
    I tried to follow the steps you mentioned to verify the task. however, not successful in my pursuit.


Thanks for your suggestions.

Thanks and regards
Swaroop

Congrats, @swaroopcs88!

In your first question, I’m assuming you were referring to just the mysql -u kodekloud_roy -p -h stdb01 command. I executed that command to verify whether I could connect to mysql on hostname ‘stdb01’ as username ‘kodekloud_roy’ and the ‘-p’ was to prompt me for my password. If that failed, wordpress would have failed to connect as well.

As for your second, I don’t recall how MariaDB was configured on the server. In fact, I may have installed MariaDB 10, which might use different config files/locations than MariaDB 5.5 (the default).

You should have been able to verify your task the same way I did in my initial screenshots - by verifying that you can connect to mysql from all 3 app servers and by verifying that wordpress is a rendering correctly. I showed that I can connect from all 3 app servers because someone could easily configure just the first app server correctly, test wordpress once, and consider the task complete since the loadbalancer would initially serve from just the first app server…

I hope that helps,
Peter

1 Like