Mysql installation


I need some help configuriong mysql on 3.04 firmware

so far i installed mysql-server with those commands

-aptitude update

-aptitude install mysql-server

created password …

then i followed instructions from xbmc’s wiki and created advancedsetting.xml and the xbmc user on the mysql side

the problem is librarys won’t creates.

do i need to install php5 thing

i have lost the gui and ssh once.  (possibly cake error, not sure) i don’t wish to go through that again

can i follow insturctions for mybook live?

what am i missing?


php5 should allready be installed on your My Cloud by default. You could check via the following command in SSH

php -i

When installing mysql-server, did it complain about missing dependancies?

Also, what instructions are you following for the my book live?


but did not install php5 mysql because of cake error

I’m confused, didn’t the cake error only appear when updating php itself, thus not when installing the php-mysql package?

It sure looks like that package is necessary for mysql to work

So i should not enconter any problem by installing php-mysql package?

joskevermeulen wrote:

php5 should allready be installed on your My Cloud by default. You could check via the following command in SSH

php -i


When installing mysql-server, did it complain about missing dependancies?


Yes some librarys wher missing


Also, what instructions are you following for the my book live?


so i tried to install php5-mysql but it says i am missing php5-common

when i try to install php5-common it  say i already have newest version

is there a simple way to install all dependencies easily?

I’m not sure about xbmc but does it requires php to work with mysql? Not just direct tcp:3306? You’ll face lots of dependency issues trying to install php-mysql.

If I get you correctly you mentioned earlier you already have mysql installed and created the password. Was the mysql-server installation successful? If you happen to install mysql-client try “mysql -u root -p” and login to access your tables. Else try install some other webui such as phpmyadmin to access your mysqld. It should be running “ps -ef | grep mysql” by default on port 3306.

I’m on firmware v4 now with mysql 5.5.38 but I think I had a hard time installing mysql on firmware v3 due to dependencies…

Note that php-mysql below needs apache2 and php5 to be upgraded or you’ll break WD’s DashBoard:

i did install mysql-client  and i am able to login mysql show database and stuff

here’s what  i get from this command  ‘ps -ef | grep mysq’


also php version is  5.4.11-1

how more easy with 4.0 firmware?

I see that lots off people have done this successfully. Anyone CAN walk me throught


for anyone interested here’s how i did 

-first i did a system restore and went back to a unmodifed firmware.  so i could start over

i used those two command in putty

apt-get update (not upgrade, NEVER)

and then 

apt-get -f install mysql-server 

(-f stands for fixing)

created a password when prompt appeared

then i rebooted the wdmc (mycloud)

after that i re-opened putty and wrote:

mysql -uroot -p  (-u is for user and -p is for password)

entered password when asked

then i followed these instructions

launched xbmc and voila!


I’m glad you figured it out!

Out of curiosity, why would you need mysql for xbmc? (I just recenly started using xbmc on a raspberry pi)

Unified library :wink:

Joskevermeulen Check this article

Ok thanks! Having multiple xbmc clients never occured to me. The ammount of configurability of xbmc is amazing…

I tried doing this today and ran into some issues.

After apt-get -f install mysql-server I get some errors as shown in the attached log:

Then when I try to run mysqld I get the following:

/usr/sbin/mysqld: error while loading shared libraries: ELF load command alignment not page-aligned

I tried installing libsaoi1 but it seems like it’s already installed.  This is on a MyCloud running v04.00.00-607.

I am tempted to try restore - but will that not erase all my shared backups?

MyCloud:~# apt-cache policy libaio1
Installed: 0.3.109-4
Candidate: 0.3.109-4
Version table:
*** 0.3.109-4 0
500 jessie/main armhf Packages
100 /var/lib/dpkg/status
0.3.109-3 0
500 wheezy/main armhf Packages

“dpkg: warning: files list file for package ‘libpam-winbind:armhf’ missing; assuming package has no files currently installed”

The errors that you’re seeing above is normal when you try to “apt-get install” on this device because the packages has been modified by WD. It’s safe to ignore as long you didn’t remove/upgrade anything during the installations.

BUT the main “problem” is now you’re on firmware V4. You will not be able to use “apt-get install” successfully due to V4’s 64K memory page size. You’ll need to rebuild the debs patched with this new V4 requirement. See this thread for more info: [GUIDE] Building packages for the new firmware… someone tried it?

Doing a restore from WD’s Dashboard settings will not fix this, you’ll need to reflash the firmware. Download the V4 firmware manually and upgrade it from the Dashboard settings. It will not wipe your shared backups. If after the upgrade you see WD Dashboard acting weirdly, go to the settings again and do a “system” only restore. This will also preserve your shared backups.

I have MySQL installed on V4 but only after going through all the rebuild hassle. I would advise if you really want to have MySQL installed, downgrade to V3 to be able to use “apt-get install”. There’s two method, modify the upgrade script or the version file. Search this forum for details.

Thank you for the very detailed explanation of what is going on - very much appreciate the time you put into that response.

Building from source on another machine is likely over my head - it seems like the easiest thing to do would be to downgrade to version 3 of the firmware then install mysql.  

However - If I am understanding properly - upgrading to firmware 4 would then break my installation of mysql because it hasn’t been compiled with the proper options.

Building from source is not something I would want to undertake.  Too many steps for me to go wrong.

Seems like a pretty weird decision to handicap the hardware like this in version 4.  Is this something that is likely to change in the future?

No problem. If you read the thread link I posted from the very 1st post, try to understand and follow the steps given, you should have at least be able to build those simple deb like htop.

I’m afraid nothing will change in the future. WD seems to keep it this way. I haven’t installed the latest V4 released few days back but I did download and pull out the img file. It has the same 64k page size memory builds :frowning:

Thermo wrote:

Seems like a pretty weird decision to handicap the hardware like this in version 4.  Is this something that is likely to change in the future?

This might be an interesting read:

Also found this pretty decent explanation here:

Using large pages instead of the default 64K page size can improve application performance. The performance improvement of using large pages is a result of a more efficient use of the hardware translation caches which are used when translating application page addresses to physical page addresses. Applications that are frequently accessing a fast amount of memory benefit most from using pages sizes that are larger than 64K.

I presume this means they won’t go back on their decision, as the hardware is designed for a very specific purpose and not designed to run third party applications on. From their point of view breaking compatibility with 3rd party apps is likely a non-issue.


I’m using the ‘Western Digital MyCloud 4tb’ as NAS server for my movie collection. I use XBMC/Kodi to control them. Now i would like to have XBMC/Kodi to synchronize with other computers. For that i have to install MySQL and phpMyAdmin on my WD MyCloud. Here starts a lot of trobble for me, I’m a computer amature and i can get it started. Is there someone who is so kind to explane to me step by step what i must do to get MySQL and phpMyAdmin installed on my WD MyCloud? The firmware is v04.01.02-417 so if i understand it correctly i have to downgrade it. Please help me out here. Thanks in advanced!