Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MySQL 5.5 Plugin

Featured Replies

  • Author

Update to 5.5.28 in first post.

  • 2 weeks later...
  • Replies 258
  • Views 66.8k
  • Created
  • Last Reply

in the MySQL settings screen it states:

 

Configuration Location: /etc/my.conf

 

Yet I have no such file in /etc. I want to disable .bin logging or at least have it expire after 14 days or so in order to keep the .bin files under control. I need to edit the my.conf file for this, but there isn't one. Should there be one already? Does this file get wiped at each reboot? If so I guess I need to create a file somehwere on the flash drive and have it copied to the right location on boot using my go file.

After some looking thru the .plg file I am more confused.

 

The weGUI says:

 

Configuration Location:  /etc/my.conf

 

But the script has:

 

    if (file_exists("/boot/config/plugins/mysql/my.cnf")) {
      unlink("/etc/my.cnf");
      copy("/boot/config/plugins/mysql/my.cnf", "/etc/my.cnf");
    }
    else {
      exec_log("cp /etc/mysql/my-medium.cnf /etc/my.cnf");
      exec_log("sed -i -e '/^#innodb_data_home_dir/c\\innodb_data_home_dir = '$DATADIR'' /etc/my.cnf");
      exec_log("sed -i -e '/^#innodb_log_group_home_dir/c\\innodb_log_group_home_dir = '$DATADIR'' /etc/my.cnf");
      exec_log("sed -i -e '/^#innodb_log_arch_dir/c\\innodb_log_arch_dir = '$DATADIR'' /etc/my.cnf");
    }

 

So in one place it is called my.conf and in the other it is my.cnf. Which should it be?

  • 2 weeks later...

Is this plugin still broken in terms of "clean powerdown"? I'm using a UPS, so this is quite important.

 

An error message like "ERROR: MySQL server PID file could not be found!" is shown in the terminal window and at the end of the shutdown sequence "INIT: No more processes left" is displayed. This is preventing unRAID from shutting down completely.

 

http://i.imgur.com/F8UWV.png

 

Using mysql5_20120805 as per OP.

 

Please see url above for issue.

 

Running /etc/rc.d/rc.mysqld stop

ERROR! MySQL server PID file could not be found!

 

I dont get it, what's in the following is what gets trigger on shutdown, no?

 

cat /usr/local/emhttp/plugins/mysql/event/unmounting_disks

#!/bin/bash

/etc/rc.d/rc.mysql stop

 

So why is /etc/rc.d/rc.mysqld stop getting triggered?

 

Well, it appears that /etc/rc.d/rc.0 executes it, don't know why...?

 

EDIT: So I figure it's part of the default bzroot that comes with unRAID, at least the part in /etc/rc/rc.0,

 

# Stop the MySQL database:

if [ -r /var/run/mysql/mysql.pid ]; then

  . /etc/rc.d/rc.mysqld stop

fi

 

And I thinkg it's the package mysql-5.5.28-i486-1gds.txz that installs the /etc/rc.d/rc.mysqld

 

only solution instead of modifying the bzroot is to add this to the go script

 

sed -i.bak 's/mysqld/mysql/g' /etc/rc.d/rc.0
  • Author

Thanks thought this issue is gone, will incorporate into the plugin in the next few days.

Will the my.conf issue I mentioned above be resolved in the next version as well?

I am sorry for my lack of understanding.  I have searched and read posats both here and on the XBMC forum. I have Unraid 5.0 rc-5 pro installed.  I believe i have mysql installed through unmenu but I am not sure how to confirm.  I can access my unraid server with attached monitor and keyboard, no telenet necessary.  I am getting lost from there on the configuration to centralize XBMC data.  Could someone help a newbie?  I don't think it should be this difficult, btw, I have one XBMC box on a Win 7 box and another on a linux ubuntu box.  Thanks for any help.

  • 2 weeks later...

I cant create a user, I get the error:

mysql> CREATE USER 'xbmc' IDENTIFIED BY 'xbmc';

ERROR 1396 (HY000): Operation CREATE USER failed for 'xbmc'@'%'

 

Help?????

 

Also, in your instrcutions you link to this but it doesnt work anymore:

http://wiki.openelec.tv/index.php?title=Configure_MySQL_database

 

 

I been using these instructions to try to get this running but am stuck on the first part:

http://lime-technology.com/forum/index.php?topic=11473.0

 

I origianlly had it installed via unmenu but I like the fact that the configuration is on the unraid settings screen.  I didnt get 100% working via unmenu but I got to the point that xbmc created the database.

 

Thanks for the plugin!

  • 2 weeks later...

I installed plugin but im stuck with the password

Need some help

If i look into unraid gui it says

Initial root pasword:    Root

 

But i cant change it

When i telnet in and i give the command

Mysql -u root -p

Hes asking for pasword, but i cant type in "root"

 

How come?

Anyone?

nobody?

Yeah I am working on those 2 features already, preparing mysql for xbmc shouldn't be a problem. Changing root password neither, will be done in a few days.

 

any luck with it?

I'm stuck here and i really want it

when you type a password on a linux system, there will be no visible characters displayed. no * like you might be used from windows.

just type the password and hit enter

when you type a password on a linux system, there will be no visible characters displayed. no * like you might be used from windows.

just type the password and hit enter

 

lol

stupid of me , thx

i installed it, however it seems i got problems shutting down, as soon i hit "stop" array or shut it completely down.. its not responsive.. it keeps saying unmounting disks , retry, retry etc etc

 

something still uses data on one of your array disks... it may be your telnet-connection (if you are currently in one directory in /mnt/user or /mnt/disk....)

of course, it could also be this plugin, if you have the data directory on your array and maybe mysql isn't stopped correctly

 

i'm not familiar with this plugin, so i can't tell at the moment...

So i changed this:

 

advancedsettings>

-<videodatabase>

<type>mysql</type>

<host>192.168.0.117</host>

<port>3306</port>

<user>xbmc</user>

<pass>xbmc</pass>

<name>xbmc_video</name>

</videodatabase>

-<musicdatabase>

<type>mysql</type>

<host>192.168.0.117</host>

<port>3306</port>

<user>xbmc</user>

<pass>xbmc</pass>

<name>xbmc_music</name>

</musicdatabase>

</advancedsettings>

 

 

To this:

 

<advancedsettings>

    <videodatabase>   

    <type>mysql</type>

            <host>192.168.0.117</host>       

    <port>3306</port>

            <user>xbmc</user>

            <pass>xbmc</pass>

    </videodatabase>   

 

    <musicdatabase>   

    <type>mysql</type>

            <host>192.168.0.117</host>

            <port>3306</port>

            <user>xbmc</user>

            <pass>xbmc</pass>

    </musicdatabase>

</advancedsettings> 

 

now i tried importing video and it worked!

i tried importing music, but it seems like hanging, not sure..

 

so we are a step further

keep you informed!

Hi Team.

 

I must be missing something sorry but should I be able to connect to this from a local machine running the MySQL GUI tools?

So I believe the reason I cannot connect is because MySQL is not actually starting. If anyone could help that would be bloody handy. :)

 

Log is attached:

MySQL_Log.txt

Out of the blue, mysql stopped working for me after a reboot. Not sure what is going on. I've tried starting with a fresh data directory. I've tried deleting the mysql user. I've tried changing permissions on everything I could think of. Nothing seems to be fixing it. Frustrated...

 

Here is my log file, for what it's worth.

 

Start: December 22, 2012 01:25:45 AM

SERVICE: enable

DATADIR: /mnt/cache/apps/mysql

 

CMD: mkdir -p /mnt/cache/apps/mysql

Results:

 

CMD: grep ^mysql /etc/passwd

Results: mysql:x:27:27:MySQL:/var/lib/mysql:/bin/false

 

CMD: useradd -r -g users -d / -s /bin/false mysql &> /dev/null

Results:

 

CMD: cp /etc/passwd /etc/shadow /boot/config

Results:

 

CMD: usermod -a -G users mysql

Results:

 

CMD: chown -hR mysql:users /mnt/cache/apps/mysql

Results:

 

CMD: chmod -R go-rwx,u-x,g+u,ug+X /mnt/cache/apps/mysql

Results:

 

CMD: cp /etc/mysql/mysql.server /etc/rc.d/rc.mysql

Results:

 

CMD: sed -i -e '/^datadir=/c\datadir='/mnt/cache/apps/mysql'' /etc/rc.d/rc.mysql

Results:

 

CMD: sed -i -e '/^mysqld_pid_file_path=/c\mysqld_pid_file_path=/var/run/mysql/mysql.pid' /etc/rc.d/rc.mysql

Results:

 

CMD: sed -i -e '/^user=/c\user=mysql' /etc/rc.d/rc.mysql

Results:

 

CMD: sed -i -e '/^basedir=/c\basedir=/usr' /etc/rc.d/rc.mysql

Results:

 

CMD: cp /etc/mysql/my-medium.cnf /etc/my.cnf

Results:

 

CMD: sed -i -e '/^#innodb_data_home_dir/c\innodb_data_home_dir = '/mnt/cache/apps/mysql'' /etc/my.cnf

Results:

 

CMD: sed -i -e '/^#innodb_log_group_home_dir/c\innodb_log_group_home_dir = '/mnt/cache/apps/mysql'' /etc/my.cnf

Results:

 

CMD: sed -i -e '/^#innodb_log_arch_dir/c\innodb_log_arch_dir = '/mnt/cache/apps/mysql'' /etc/my.cnf

Results:

 

CMD: /etc/rc.d/rc.mysql start --user=mysql

Results:

 

CMD: ln -s /tmp/mysql.sock /var/run/mysql/mysql.sock

Results:

 

End: December 22, 2012 01:25:45 AM

Nevermind, I got it running.

- I deleted all the old packages of mysql from /boot/packages

 

- Downloaded the latest to the same directory

curl -O http://slackpack.ludost.net/packages/13.37/mysql-5.5.28-i486-1gds.txz

 

- Reinstalled the latest manually to the same directory

upgradepkg --install-new /boot/packages/mysql-5.5.28-i486-1gds.txz 

 

- Started MySQL from the Unraid settings menu, got a bunch of errors in the log about needing to upgrade my database

 

- Upgraded my database

mysql_upgrade --port=3306 --socket=/tmp/mysql.sock --password=root 

 

Hopefully this will help someone else...

  • 2 weeks later...

I'm having some problems with keeping the MySQL server up.  Seems like something is happening overnight, but in the morning I get this error:

 

"Can't open and lock privilege tables: Table 'mysql.host' doesn't exist"

 

I can't figure out why thats happening.

 

If I delete the data directory and restart the service it works fine, although everything has been deleted to make it work.

 

Any insight?

OK figured it out!

 

When I changed the directory for the data from the default location to the cache disk, it created a share.

 

For some reason when setting it to "Use Cache: Only" it did not work because the plugin created the folder, so the mover was moving the files in the morning, which MySQL could not find.

 

Deleting the folder contents and the share, and then manually creating the share and setting it to "Use Cache: Only" prior to starting up MySQL again seems to have resolved the issue.

  • 2 weeks later...

So I can't even log in to mysql.  Should the user and group for mysql be mysql:users?  For people having trouble, did you upgrade to RC9a?

 

drwxrwxrwx 1 nobody users 240 Jan 11 09:07 couchpotato_v2/

drwxrwxrwx 1 nobody users  96 Jan  9 11:26 crashplan/

drwxrwxrwx 1 nobody users  72 Jan 11 09:07 gamez/

drwxrwxrwx 1 nobody users 160 Jan  3 07:19 headphones/

drwxrwx--- 1 mysql  users 384 Jan 11 09:21 mysql/

drwxrwxrwx 1 nobody users 192 Nov 24 22:12 sabnzbd/

drwxrwxrwx 1 nobody users 312 Jan 11 09:12 sickbeard/

drwxrwxrwx 1 nobody users 552 Jan 11 09:07 transmission/

root@Tower:/mnt/user/appdata# cd

 

root@Tower:~# mysql -u root -p

Enter password:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y                                                                                    ES)

root@Tower:~# mysql -u mysql -p

Enter password:

ERROR 1045 (28000): Access denied for user 'mysql'@'localhost' (using password:                                                                                      YES)

root@Tower:~# mysql -u root -p

Enter password:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y                                                                                    ES)

 

Also if I change it to nobody:users it stays like that until I restart mysql and then it goes back to mysql:users

I tried down grading to RC8 and install mysql again and now I am getting this error:

 

installing plugin: mysql5_20120805

file /boot/packages/mysql-5.5.28-i486-1gds.txz: downloading from http://ftp.sotirov-bg.net/pub/contrib/slackware/packages/slackware-13.37/mysql-5.5.28-i486-1gds.txz ... http://ftp.sotirov-bg.net/pub/contrib/slackware/packages/slackware-13.37/mysql-5.5.28-i486-1gds.txz:

2013-01-11 10:13:08 ERROR 404: Not Found.

bad download, deleting

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.