To test your endurance skills, I really recommend trying to configure a remote server in linux from scratch.
And believe me, it's no fun to find yourself without the support of a nice and comfortable menu filled with round buttons and all sort of functions available at the distance of a click.
That's right, as mentioned on the previous blog post - R1Soft has sponsored a fully dedicated server and I had the task of configuring the mySQL databases to be used by sites that run on another server.
My first mistake was ignorance.
Little I knew about apache installed and running on a ubuntu machine.
I was already quite experienced on the tasks of configuring and running web servers based on XAMPP for either Linux or Windows and never really felt the need of running a non-portable Apache/MySQL/PHP/etc.
Yesterday, I started working on the mySQL database transfer from boot-land.net to the new server location.
At first, I noticed that I couldn't find the usual PHPmyAdmin web tool so I tried installing it. For my surprise the OS (ubuntu) replied back that it was already installed.
Hmm.. In a smart move I removed the package and installed it manually.
Now I could access phpMyAdmin but to my (second) surprise, I wasn't allowed to create any new databases since my default root user had no privileges for this task.
Well.. now began the intensive googling process for answers but few seem accurate and explain exactly what was required to achieve.
Tried literally dozens of different methods and none seemed to work as expected and I simply couldn't figure the logic related to this consecutive failure.
Gave a few more shots and after a few hours I could say to my deception that I had rendered the webserver functions of this server completely useless.
---
As last resort, decided to reinstall the OS from scratch and start all over again.
---
This time I took more time understanding what already came installed on the OS by default.
Looked on the work directories and still couldn't figure out why phpMyAdmin wasn't acessible from the web even thought this time after the restore I was perfectly allowed to manage mySQL from the command line interface.
Some more investigation proved quite relevant - I found an intriguing reference to "plesk" - but what the heck was a "plesk".
On a further google-crawl took to the respective product homepage where I was able to read their documentation.
So, plesk is a web based server administration tool (and a good one so it seems) but the most interesting fact is that you need to access throught a very particular port on your server.
Now why hasn't mentioned this on the first place?!?
Well.. adding the magic port number opened the doors to remote server administration with a nice UI.
I felt right at home at last..
From there was able to click on a shortcut to access phpmyAdmin and manage all my database related needs.
---
Now came the time to transfer the databases to the new server, the dumping of databases from the old server went fine (after some google for syntax examples to learn from) and transfered them with the simple wget to the new location (was a breeze to transfer 140Mb in little 10 seconds!).
Then it was time to upload the database into the mySQL from the new server - was also a breeze and went with no noticeable troubles.
Last but not least, edited the first site (winbuilder.net) with the details of the new server - but no dice!
Now why the heck wouldn't it work?
Used "telnet newmySQLhost -3306" and it wouldn't simply connect.
After too much time I figured that it was necessary to open the respective door on the server so that it was possible to reach it.
Now I could telnet, so I wrote a quick php script to test the connection and it would always complain back with some "connection refused".
Hmm.. more troubles?
Oh yes. Took me yet another good amount of time to discover that you need to need to allow the respective mySQL user to have enough previlege to access mySQL from an external location.
Sure thing, went back to phpMyAdmin and done as expected.
-----------
A bit tired since I'd been all day long on this very amusing task, I changed the configuration files for winbuilder.net and added the new mySQL settings - IT WORKS!!
Got too long and too tiresome for a task that could had been well documented from the start instead of wasting time on such things (yes I looked up for the documentation..)
Took little time to apply the same scheme for the other mySQL hosted sites like boot-land.net and the transition went smoothly.
------------
Guess I (re)learned the pleasure of learning and using the command line interface to get things done.
:)
No comments:
Post a Comment