Installation and Configuration of MySQL on Fonz fun_plug

German version of this tutorial

This tutorial is deprecated and should only be used with fonz fun_plug 0.5!
Please check the tutorial page for updated tutorials on this topic!

MySQL is an open source database management system (RDBMS) provided by a commercial company acquired by Oracle. Although the software is free, the company provides commercial support and consultancy (this is a similar model to certain Linux distributions).

Logo of MySQL
Logo of MySQL
An RDBMS is a software tool to store, access and update (often large) amounts of data structured as interrelated tables. Originally, databases were typically used for adminstrative purposes such as storing employee- or inventory information. Nowadays, databases are also widely used to store the raw content from which dynamic web sites are generated. This allows the same information to be presented in different ways. Because SQL is a standardized language to update or access an RDBMS, it also avoids relying on proprietary storage formats with associated risks of obsolescence or lock-in to particular software.

Although there are various other open source and commercial RDBMS systems available, MySQL is commonly used in web development in conjunction with Linux, Apache (or lighttpd), and php. Wikipedia, for example, runs on MediaWiki software written in PHP and uses a MySQL database.

Contents

Setting up MySQL

Installation

Uli kindly provided a packaged version of MySQL for the NAS in his repository.

MySQL is not installed as part of fun_plug by default, but you should already have downloaded a copy as part of the general tutorial on how to download, install and upgrade packages. Let’s first make sure you still have the latest version (as Uli upgrades his repository regularly).

Note that the installation command below could take a while:

funpkg -i /ffp/pkg/additional/*/mysql-*.tgz

If you have a version of mysql installed that is outdated, you will need to run in upgrade mode instead (see here for help):

funpkg -u /ffp/pkg/additional/*/mysql-*.tgz

Configuration

MySQL can be configured with a file called my.cnf. After installation you can configure several MySQL settings by copying an example-file from /ffp/etc/examples/mysql/ to /ffp/etc/:

cp /ffp/etc/examples/mysql/my-small.cnf /ffp/etc/my.cnf

Directories

MySQL stores the data of its databases in files which are in turn stored in a directory named /srv/mysql/. Instead of creating the directory at that location, you may prefer to create a symbolic link from /srv/ to the target-directory of your choice.
First we create it:

mkdir -p /ffp/opt/srv/mysql
mkdir -p /ffp/opt/srv/tmp/mysql

Now we link it to /srv/:

ln -s /ffp/opt/srv/ /srv

This link will be lost after rebooting the device, so you have to add the following two lines to the end of the file /ffp/etc/fun_plug.init to recreate the link every time the NAS boots. You can edit this file using an editor like nano:

# create custom link to the server-folder
ln -s /ffp/opt/srv/ /srv

Initialization

MySQL needs some internal databases for the initial startup which can be installed by issuing the mysql_install_db command:

cd /srv/
ls -al
/ffp/bin/mysql_install_db
ls -al

This results in several warnings (which you can ignore) about adjusted sizes system- and help tables. Typical partial output:

081116 22:05:32 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
081116 22:05:32 [Warning] option 'max_join_size': unsigned value 18446744073709551615 adjusted to 4294967295
081116 22:05:32 [Warning] option 'myisam_max_extra_sort_file_size': unsigned value 2147483648 adjusted to 2147483647
081116 22:05:32 [Warning] option 'thread_stack': unsigned value 65536 adjusted to 131072

Now we manually start the MySQL server for further configuration:

sh /ffp/start/mysqld.sh start

Note that you will have to press Enter to get your prompt back (unlike other daemons).

After the first start, we have to secure the installation:

/ffp/bin/mysql_secure_installation

You will be asked several questions (shown below in abridged form) and can answer Y(es) for each of them.
For "Enter current password for root (enter for none):" you press enter because the default root password is empty.
For the new root password, it is best to use a different password than the user root of the system: this is just for owning the administration rights to the database and is unrelated to overall control over the machine.

Enter current password for root (enter for none):
OK, successfully used password, moving on...
 
Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!
 
Remove anonymous users? [Y/n] Y
 
Disallow root login remotely? [Y/n] Y
 
Remove test database and access to it? [Y/n] Y
 
Reload privilege tables now? [Y/n] Y
 
All done!

To activate this service permanently on every boot you need to enter this command:

chmod a+x /ffp/start/mysqld.sh

Testing MySQL

After MySQL has started, you can test your installation using the following ways:

Command-line

Enter the following command on the command-line:

mysql -p

This will open a special mysql-command-line, where you can enter regular SQL-Commands. Now change to the database “mysql”:

USE mysql;

Then select the Host, User and Passwort from the Database:

SELECT Host, User, Password FROM user;

Finally exit the mysql-command-line:

exit;

A sample output will look like this:

root@CH3SNAS:/srv/mysql# mysql -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.67 Source distribution
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 
mysql> USE mysql;
 
Database changed
mysql> SELECT Host, User, Password FROM user;
 
+-----------+------+-------------------------------------------+
| Host      | User | Password                                  |
+-----------+------+-------------------------------------------+
| localhost | root | *8D2414F01991E3B0B86E14D2469EACA0B6D78B99 |
| CH3SNAS   | root | *8D2414F01991E3B0B86E14D2469EACA0B6D78B99 |
| 127.0.0.1 | root | *8D2414F01991E3B0B86E14D2469EACA0B6D78B99 |
+-----------+------+-------------------------------------------+
3 rows in set (0.01 sec)
 
mysql> exit;
Bye

By the way: As you can see, passwords are crypted (in this case it was “nas-tweaks.net“).

PHP

For the following, you need to install lighttpd and php in case you haven’t already done so.
You also need to enable the mysql module of lighttpd by editing the /ffp/etc/php.ini file:

; Linux extensions
extension=calendar.so
;extension=ctype.so
;extension=ftp.so
;extension=gd.so
;extension=mbstring.so
extension=mysql.so
;etc

Make sure you define the folder which contains all the above modules in line 536 of the php.ini file. Usually it should be:

extension_dir = "/ffp/lib/php/extensions/no-debug-non-zts-20060613/"

You will need to restart the web server if you enabled the my-sql extension, or changed the extension_dir using:

sh /ffp/start/lighttpd.sh restart

Then place a file called testmysql.php in the document-root (as configured here e.g. /srv/www/pages) with the following content (replace YOURROOTPASS with the password of mysql user root):

<?php
// Connect to the database
mysql_connect("localhost", "root","YOURROOTPASS");
// Select the database "mysql"
mysql_select_db("mysql");
// Query the database for the Users:
$result = mysql_query("SELECT Host, User, Password FROM user;");
// Print the results
while($row = mysql_fetch_object($result))
{
	echo $row->User . "@" . $row->Host . " has the encrypted password: " . $row->Password;
}
// Close the connection to the database
mysql_close();
?>

If opening this page in your browser doesn’t give the expected results, check the password, and if needed close and open the browser again.

When you are done, you may want remove the root password (or delete this .php file) to avoid exposing the mysql password in the line mysql_connect("localhost", "root","YOURROOTPASS");.

Users and privileges

Adding additional Users

As you should never use the root-password of your database, you can add additional users in the mysql-command-line (enter “mysql -uroot -p” on the command-line).
Please consult the mysql-manual for more examples.

  • A User with all privileges, who can only connect from localhost:
    GRANT ALL PRIVILEGES ON *.* TO 'YOURUSERNAME'@'localhost' IDENTIFIED BY 'YOURPASSWORD' WITH GRANT OPTION;
  • A User with limited privileges, who can only connect from localhost:
    GRANT SELECT,INSERT,UPDATE,DELETE ON *.* TO 'YOUROTHERUSERNAME'@'localhost' IDENTIFIED BY 'YOUROTHERPASSWORD' WITH GRANT OPTION;
  • A User with limited privileges on a certain database:
    CREATE DATABASE databasename;
    GRANT SELECT,INSERT,UPDATE,DELETE ON databasename.* TO 'YOURSPECIALUSERNAME'@'localhost' IDENTIFIED BY 'YOURSPECIALPASSWORD' WITH GRANT OPTION;

After you send add or alter the rights, please make sure, that these get loaded by executing the following command in the mysql-command-line:

FLUSH PRIVILEGES;

Allowing external access

Per default external access is not allowed as this is a security risk. But many tools like HeidiSQL or other external administrator-programs rely on access from the outside of your NAS.

Caution: You should explicitly check the rights of your users! All MySQL-users should have passwords!

First follow the section on “running mysql under a user with limited rights“, then follow these instructions:

Stop the mysql-server:

sh /ffp/start/mysqld.sh stop

Edit /ffp/etc/my.cnf and add a comment to the line skip-networking, so that it looks like this:

#skip-networking

Edit /ffp/start/mysqld.sh and find the line beginning with mysqld_flags and remove “--skip-networking” between the two quotation marks. Save the file afterwards.

Running mysql under a user with limited rights

Per default the MySQL gets started with root-rights. This means, that if the MySQL-server is breached by a intruder, the system probably can be corrupted. Be advised to use the mysql-server only in secure areas (e.g. your local LAN without internet access) and to disable external access (default).

If you want to secure your installation please follow the following steps:

Stop the mysql-server:

sh /ffp/start/mysqld.sh stop

Add a new user with limited rights:

useradd -U -s /bin/false mysql
store-passwd.sh

This will create a user mysql who is in the group mysql (-U add a new group) and who cannot log in. It will probably show up in the Webinterface, but cannot be used!

This user needs access to the directories of MySQL:

cd /srv
chown -R mysql:mysql mysql
cd /ffp/var/run/
chown mysql:mysql mysql

Edit /ffp/start/mysqld.sh and find the line beginning with mysqld_flags and remove “--user=root” between the two quotation marks. Save the file afterwards.

Then start MySQL again:

sh /ffp/start/mysqld.sh start

With these changes, MySQL is started under the user mysql.

Removing MySQL

If you want to remove MySQL and its databases, you proceed like described in the general tutorial on packages.
First, stop mysql:

sh /ffp/start/mysqld.sh stop

Then remove the package with funpkg:

funpkg -r /ffp/pkg/additional/*/mysql*.tgz

Afterwards you have to remove the databases (careful!). Change to the folder /srv/ and delete the folder mysql:

cd /srv/
rm -R mysql

Furthermore, you should undo the change in /ffp/etc/fun_plug.init, possibly remove the (harmless) symbolic link /srv/, but especially disable execution of the startup script:

chmod a-x /ffp/start/mysqld.sh

Voilá, MySQL is removed.

57 thoughts on “Installation and Configuration of MySQL on Fonz fun_plug”

  1. Found a small bug in this tutorial. It’s kind of typo mistake but I got error when I ran this command:
    mysql>SELECT Host, USER, Password FROM USER;

    Error 1146: Table mysql.USER doesn't exist.

    Next window in this tutorial with the same line of command it’s a bit different and it reads:

    mysql> SELECT Host, User, Password FROM user;

    and this is correct and it gives output as expected.

    1. Thanks, fixed. The highlighter for the code changed it, now it’s not highlighted but syntactically correct 😉

      Regards,
      Uli

  2. Hi,
    I followed the guide and all worked fine unitl the secure install. It says to type the root password in, so i leave it bank and it gives an error:

    Enter current password for root (enter for none):
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/ffp/var/run/mysql/mysql.sock' (2)

    I dont know what to do. The lighttp and php have been installed already using the guides here (they are excellent by the way).

    Any help would be great,
    Steve

  3. Working wiht some php apps that now require mysqli.so extension for php. Is ther a possibility you could compile and package this extension. My PHP/mySQL version combo happens to be 5.2.9 and 5.1.28. I have tried to use the PHP extension generator using phpize, but ran into issues with the c compiler portion of the ./configure script.

    1. Hello JLM,

      with the next version of php, i will compile mysqli. Currently compiling php takes too long but i will consider recompiling it as soon as possible.

      Cheers,
      Uli

      1. Have you compiled php to include the mysqli extension? I need it badly and I’d appreciate it a lot if you can share it.

  4. There is a typo in this article that breaks the MySQL install:

    # create custom link to the server-folder
    ln -s /mnt/HD_a2/www/ /srv

    should actually be

    # create custom link to the server-folder
    ln -s /mnt/HD_a2/srv/ /srv

      1. no problem, thanks for the awesome tutorial… MySQL, and subsiquently phpMyAdmin, are finally working as expected and rockin’ it out. Cheers.

  5. Hi firstly THANK YOU for the fantastic tutorials made my life a breeze. Secondly…

    item 1.1 Updating mysql code is wrong:

    It reads: “funpkg -u /ffp/pkg/additional/mysql-*.tgz
    should say: “funpkg -u /ffp/pkg/additional/dev-db/mysql-*.tgz

    I’d worked my way through the guide only to discover MySQL wasn’t being loaded by PHP. Took me a while to realise it was a version issue as I’d presumed it was already the latest version!

  6. Hey – one quick fix for the “Running mysql under a user with limited rights” section:
    You also need to chown mysql:mysql tmp/mysql so that mysql can create its temp files. It will fall back on inefficient methods (like “repair by keycache”) if it can’t write temp files, but you really want to have the temp files dir writable.

  7. I was fine until I tested a mysqltest.php
    2011-07-14 00:23:24: (mod_fastcgi.c.2698) FastCGI-stderr: PHP Fatal error: Call to undefined function mysql_connect() in /mnt/HD_a2/www/pages/testmysql.php on line 3

    Did I miss an include somewhere?

  8. I got it. PHP.ini
    extension=msql.so
    should read
    extension=mysql.so

    Not sure if the file was delivered that way or I finger fudged it.

  9. Hello
    Iam new in ffp .i install mysql on my ffp 0.5 successfully but i need access remotely to MySQL server but i can’t access it remotely
    DNS-321 and myIP 192.168.0.10 user root or Any other user
    Thanks

  10. Hi, my name is Jose, I am from Spain so please be patient with my English, I will try to do my best.
    I have a DNS-323, I just started to install ‘fonz fun_plug’ and as fas as I know everything has gone well, I didn’t get any error.
    Right know I have finished to install the lighttpd and that’s why I am writting this message.
    It is supposed that my ports has changed from 80 to 81 (I mean to connect the standard configuration screen) and I will enjoy my new web server on 80. But nothing at all has happened in that way.
    I still have the configuration screen in 192.168.1.11 as always (wich is my local ip for the NAS), even I have rebooted the system.
    Althought, I created the three files; index, page1 and page2.html as the manual indicates me and located them into /www I can not reach them, of course.
    Does anybody know what was wrong? I had read very carefully all the steps many times and I think I have not forgotten any of them.
    It is like ‘sh /ffp/start/kickwebs.sh’ were not doing its job.
    Thanks for your help.
    I will be looking for an answer.
    Kind regards.
    Jose.

  11. I have a problem when testing mysql with lighttp+php: I get a message saying:
    PHP Fatal error: Call to undefined function mysql_connect() )

    I’ve followed exactly the procedure given in your tutorial. Now my status is
    lighttp is working (index.html is OK)
    php is working (index.php is OK)
    mysql is working (using the command line)

    but php + mysql is not working ! (the page testmysql.php is returning the error mentionned above)

    I’ve checked again and again the php.ini was correctly configured. After some peeking around, I found that the file mysql.sock ends up in the folder /mnt/HD_a4/ffp/var/
    it might be normal, but when reading the different configuration file, I get the idea that it should be located in /mnt/HD_a4/ffp/var/run/mysql and there is nothing there!

    shall I be concerned about it ?

    1. i encountere the same issue.
      Mysql doesn’t work together with PHP.
      How to fix it ?

  12. Hi,

    I installed mysql under funplug 0.7 and everytime I want to the secure the installation, I get the following problem:

    Enter current password for root (enter for none):
    ERROR 2013 (HY000): Lost connection to MySQL server at ‘sending authentication information’, system error: 32

    everything else up to this step worked fine..

    Any ideas?

    Thanks
    Spot

    1. Spot / Uli

      I am having the same problem. I’m working with a DNS-321 and used slacker to update/install the pkgs.

      Paul

      1. I had the same problem for my DNS-320, and later found out that the installed mysql package was out dated. The problem was resolved by updating the mysql package using this command:

        funpkg -u /ffp/pkg/additional/*/mysql-*.tgz

        as stated in the tutorial.

        — Wilkin

  13. Hi, I’ve secured my installation and everything is working great. Except when I reboot the NAS, mysql starts as root which doesn’t have access anymore 🙁 If I kill the process and start mysql using the start script all if fine. Have I missed a step here?

    James

  14. Hey guys,

    Have installed fonz and downloaded all the upgraded packages, can see them in the file structure, however:
    funpkg -i /ffp/pkg/additional/*/mysql-*.tgz

    Errors out with

    Skipping /ffp/pkg/additional/dev-db/mysql-5.1.58-2.tgz: Invalid package filename

    Obviously it’s found the file or it wouldn’t have given the full path but can’t see where I’m going wrong, any help would be great.

    Cheers

      1. I’m stuck at this. What did you do?

        Installing on 0.7

        install worked fine.
        However it fails when i run mysql_secure_installation. When i enter the root pass it returns:

        “ERROR 2013 (HY000): Lost connection to MySQL server at ‘sending authentication information’, system error: 32”

        The only thing i can do is log in as anonymous but when i run “show databases;” it returns:

        ERROR 2006 (HY000): MySQL server has gone away
        No connection. Trying to reconnect…
        Connection id: X
        Current database: *** NONE ***
        etc.

    1. I ran all the fun_plug and mysql tutorials without any issue until this error. It turns out that the current fonz version is 0.7 and this tutorial is made for 0.5. Use “slacker -Ui” and install mysql using the GUI.

      1. And if you receive the error “FATAL ERROR: Could not find ./bin/my_print_defaults” while running “mysql_install_db” use “mysql_install_db –basedir=/” instead.

  15. Hi,

    Hi gGreat work on fun-plug and all these things!

    I am having problems now that TRIGGERS are being used in XBMC in MySql. Is there a fun-plug version of Mysql after 5.1.58-2?

    Thanks

    Cian

  16. Hello Uli! Thanks for all your great job you are doing. I just want to ask you: I just installed the package uli:mysql-5.5-28-arm2.txz and when try to run /ffp/bin/mysql_install_db comes out the next: FATAL ERROR: Could not find ./bin/my_print_defaults

    If you compiled from source, you need to run ‘make install’ to
    copy the software into the correct location ready for operation.

    If you are using a binary release, you must either be at the top
    level of the extracted archive, or pass the –basedir option
    pointing to that location.

    Pls. help! Thank you.

    1. Hey, I just discovered fun_plug today on my DNS-320L…

      I had the same problem under fun_plug 0.7 with mysql-5.5.28-arm-2 but this resolved the issue for me.


      cd /srv
      /ffp/bin/mysql_install_db --basedir=/ffp
      sh /ffp/start/mysqld.sh start
      <>
      /ffp/bin/mysql_secure_installation

      Just follow your nose through the wizard and you should be up and running after that.

      1. i also get this error in creating the mysql tables

        /ffp/bin/mysql_install_db –basedir=/ffp
        Installing MySQL system tables…
        130211 18:10:46 [ERROR] /ffp/bin/mysqld: unknown option ‘–skip-locking’
        130211 18:10:46 [ERROR] Aborting

      2. I am trying to install mysql-5.5.28-arm-2 under fun_plug 0.7. I used the commands you provided but when I get to the secure installation and it asks for the root password I hit enter and get
        ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/ffp/var/run/mysql/mysql.sock’ (2)

        I ran the start command so I am not sure what is wrong.

        DNS-320

  17. hello,
    what about DNS-325 ? As I understand MySQL 5 already installed and running there, but I don’t know what user and password used. How to retrieve or reset it?

  18. i get as far as starting mysql through the deamon and get tbe following error in the mysql start log

    130211 17:47:33 [ERROR] /ffp/bin/mysqld: unknown option ‘–skip-locking’
    130211 17:47:33 [ERROR] Aborting

    im running funplug 0.7 on a dlink 323

    any help much appreciated

    Thanks

    Nicholas

    1. Edit my.cnf and either comment out “–skip-locking” or replace it with “–skip-external-locking”

      1. Thank you for your reply Thomas. I have tried replaceing the -skip-locking with -skip-external-locking and it throws the error of unknown option -skip-external-locking so i commented that out which alloed my sql to install successfully.

        the problem i now have is when i try and start the server i get the following error messages in my error log

        130216 09:55:50 mysqld_safe mysqld from pid file /ffp/data/charles.pid ended
        130216 09:56:44 mysqld_safe Starting mysqld daemon with databases from /ffp/data
        /ffp/bin/mysqld: Table ‘mysql.plugin’ doesn’t exist
        130216 9:56:44 [ERROR] Can’t open the mysql.plugin table. Please run mysql_upgrade to create it.
        130216 9:56:44 InnoDB: The InnoDB memory heap is disabled
        130216 9:56:44 InnoDB: Mutexes and rw_locks use InnoDB’s own implementation
        130216 9:56:44 InnoDB: Compressed tables use zlib 1.2.6
        130216 9:56:45 InnoDB: Initializing buffer pool, size = 128.0M
        130216 9:56:45 InnoDB: Completed initialization of buffer pool
        130216 9:56:46 InnoDB: highest supported file format is Barracuda.
        130216 9:56:48 InnoDB: Waiting for the background threads to start
        130216 9:56:49 InnoDB: 1.1.8 started; log sequence number 1595675
        130216 9:56:49 [ERROR] Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist
        130216 09:56:50 mysqld_safe mysqld from pid file /ffp/data/charles.pid ended

        do you have any ideas what could rectify this?

        Thanks

        Nicholas

        1. Are you using the version available via the optware package installer?

          Have you run secure_installation?

  19. DNS 323, Fun_Plug 0.7, mysql 5.5.28:

    root@DLINK:/srv# /ffp/bin/mysql_install_db –basedir=/ffp
    Installing MySQL system tables…
    ERROR: 13 Can’t get stat of ‘./performance_schema’ (Errcode: 0)
    130413 19:21:20 [ERROR] Aborting

    130413 19:21:20 [Note] /ffp/bin/mysqld: Shutdown complete

    Please Help!

  20. Hi to all!
    I follow this guide to create a little DB to use with three PC used like mediaplayer within XBMC.
    No problem to setup the whole system and everything work well, except for one thing…
    with the mysql daemon started my read speed decrease from 25-30MB/s to 6-8MB/s.
    I’ve used te top command to see the used resources and altough mysql doesn’t appear (don’t use the CPU) the transfer is slow and the smbd (samba) use only 10% of cpu. when i kill the mysql daemon smdb goes up to 50% and the read rate return to 30MB…

    Anyone have suggestion about this?? why mysql limit my read rate and in which way???
    something to change in my.conf????

    Regards

  21. DNS-323 and have installed funplug 0.7 with the oabi-files.

    I’ve been struggling with all of this for two full days (no exaggeration).

    I’ve uninstalled and installed fun_plug multiple times
    Trying to install mysql-5.1.58-2.tgz

    I used ‘stacker -i’ also ‘slacker -Ui’ to do the installation.

    MySql seems to install without a problem but I don’t see any of the folders for MySQL.

    There is a reference in this tutorial for a file called :
    /ffp/etc/examples/mysql/my-small.cnf

    But the only file that’s in that folder is one named my.cnf

    I was able to do a re-install using stacker -a, and it said the re-install was successful, but still no folders.

    I did ‘slacker -I’ and it said the package was installed.

    The end result is it fails trying to install a DB. I used:

    ‘/ffp/bin/mysql_install_db.’

    “FATAL ERROR: Could not find ./bin/my_print_defaults”

    I tried the various other user’s suggestions, like using ‘mysql_install_db –basedir=/’ but no luck.

    I’m really stuck.

    1. I had similar problems way back when I did this…. you need to define your default for my_print_defaults.. (i.e. set your basedir) if you google this

      “Could not find ./bin/my_print_defaults”

      you’ll see many examples how to setup your basedir variables.

      or you can pass the basedir as a parameter when running mysql_install_db

      something like this:

      mysql_install_db –basedir=”\etc\bin”

      just replace basedir with the path that has the my print defaults file.. I can’t remember off the top of my head, but if you browse you’ll see where it is on your DNS

      Also you’re going to have problems with your config file. Google and download another version of your my.cnf file

      1. sorry I see that you tried using Basedir. Another option is to simply skip the mysql_install_db, and just start the daeman

        sh /ffp/start/mysqld.sh start

        this command will actually create the db if it’s not already created. This method however requires that you have your my.cnf file containing correct entries.. you may want to open that file and try to understand it, and make changes where necessary..

        I feel your pain, I think i spent over a week trying to figure this out, until finally got it working.. It’s too bad I did this soooooo long ago, because I have now totally forgotten what exactly were my steps.. I can tell you Google REALLY helped me.. It takes patience, but have faith eventually you will get it..

        1. Ok Joh..

          I found your problem. And I do now remember that I had the same problem as you, and it took me over a week to figure it out, without anyone telling me, so feel fortunate that I am able to share my knowledge with you.

          The problem is that I believe you are trying to install mysql 5.5.28 on a DNS 323.. That package is not going to work.. Trust me it took me like 7 days to finally figure that out. Not sure what your purpose of mysql is, but if it so you can have an xbmc shared media library for Frodo, the following package will work, and is the absolute latest version of mysql that will work on a DNS 323:

          http://www.inreto.de/ffp/0.7/oabi/packages/mysql-5.1.61-oarm-4.txz

          I repeat 5.5.28 will not work DNS-323

  22. I’m a newbie to all this and after a week of setting everything up, I almost have MySQL running. I just can’t start it.

    When I run:

    root@FTP_Server:/ffp# mysql -p

    it asks for password. But, I’ve never set up a password yet. This is the first time trying to start it. So, I just press the enter key and get:

    Can’t connect to local MySQL server through socket ‘/ffp/var/run/mysql/mysql.sock’ (2)

    1. Hi,

      This problem occours if you didn’t install the database first. I guess you haven’t run the Initialization section.

      Try this before start the daemon:
      /ffp/bin/mysql_install_db

  23. Hi,

    I put this 2 lines in /ffp/etc/fun_plug.init:

    # create custom link to the server-folder
    ln -s /ffp/opt/srv/ /srv

    However, after I reboot the device, the symbolic link does not create automaticly.
    Only I have problem with this? 🙂

    Thanks for the answer!

  24. How can i fix this?

    root@FileServer:/srv# /ffp/bin/mysql_install_db
    /ffp/bin/my_print_defaults: can’t resolve symbol ‘__register_frame_info’
    Neither host ‘FileServer’ nor ‘localhost’ could be looked up with
    /ffp/bin/resolveip
    Please configure the ‘hostname’ command to return a correct
    hostname.
    If you want to solve this at a later stage, restart this script
    with the –force option

    i follow the step.

Comments are closed.